Specifies a round line buffer end cap style.
Specifies a square line buffer end cap style.
Get polygon area
Get center coordinates
Get clockwise polygon
Get convex polygon
Difference between maxX
and minX
. Equal width
(w
)
Difference between maxY
and minY
. Equal height
(h
)
Get deintesected polygon.
Get closed extend polygon
Get first point
Get length of line string.
Get length of line string. For big distances in lat/lon.
Difference between maxY
and minY
. Equal ΔY
(dY
)
Check polygon direction
For normal Cartesian coordinate system. The reason that's worth mentioning is that some common contexts, like HTML5 canvas, use an inverted Y-axis. Then the rule has to be flipped: if the area is negative, the curve is clockwise.
Get last point
Point with minimal x
and y
Next point index
Point with maximal x
and y
Get min area rectangle
Point with minimal x
and y
Get polygon clone without holes
Get perimeter.
Get perimeter. For big distances in lat/lon.
Point with maximal x
and y
Get second point
Point with width
value as x
and height
value as y
Check if polygon contain more than three points
Difference between maxX
and minX
. Equal ΔX
(dX
)
Get polygon approximation by Ramer–Douglas–Peucker algorithm
Get Bézier curve
Add to the end of polygon point equal to first point if it not exist
Check if contain point
Divide line string to pieces by length
Check is it fully equal.
Divide polygon to triangles and return points indexes
Check if has point in list of points
Check intersection with other polygon
Change start point to second point
Check if point on border
Remove from the end of polygon point equal to first point if it exist
Remove duplicates points
Check is polygons are same. They can be with different directions and different start points.
Check if it possible to include point
Transform to array of coordinates for OpenLayers or GeoJSON
Divide polygon to triangles
Transform array of triangles to Three.JS vertices
const geometry = new THREE.BufferGeometry();
// create a simple square shape. We duplicate the top left and bottom right
// vertices because each vertex needs to appear once per triangle.
const vertices = new Float32Array( DPolygon.arrayOfTrianglesToVertices(triangles, 10) );
// itemSize = 3 because there are 3 values (components) per vertex
geometry.setAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) );
const material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
Get min area rectangle direction
should be minAreaRectangle
Parse from OpenLayers coordinates
Parse from GeoJSON coordinates
Parse from OpenLayers coordinates
Parse from OpenLayers coordinates
Parse from GeoJSON
Generated using TypeDoc
Specifies a flat line buffer end cap style.