Methods
-
<static> convexHull(points)
-
Compute a convex hull using Andrew's Monotone Chain Algorithm
Parameters:
Name Type Description pointsArray.<ol.geom.Point> an array of 2D points
Returns:
the convex hull vertices
- Type
- Array.<ol.geom.Point>
-
<static> dist2d(p1, p2)
-
Distance beetween 2 points Usefull geometric functions
Parameters:
Name Type Description p1ol.coordinate first point
p2ol.coordinate second point
Returns:
distance
- Type
- number
-
<static> equal(p1, p2)
-
2 points are equal Usefull geometric functions
Parameters:
Name Type Description p1ol.coordinate first point
p2ol.coordinate second point
Returns:
- Type
- boolean
-
<static> findSegment(pt, coords)
-
Find the segment a point belongs to
Parameters:
Name Type Description ptol.coordinate coordsArray.<ol.coordinate> Returns:
the index (-1 if not found) and the segment
-
<static> fromDFCI(index, projection)
-
Get coordinate from French DFCI index
Parameters:
Name Type Description indexString the DFCI index
projectionol/proj/Projection result projection, default EPSG:27572
Returns:
coord
- Type
- ol/coordinate
-
<static> getFeatureCenter(f)
-
Get center coordinate of a feature
Parameters:
Name Type Description fol.Feature Returns:
the center
- Type
- ol.coordinate
-
<static> getGeomCenter(geom)
-
Get center coordinate of a geometry
Parameters:
Name Type Description geomol.Feature Returns:
the center
- Type
- ol.coordinate
-
<static> offsetCoords(coords, offset)
-
Offset a polyline
Parameters:
Name Type Description coordsArray.<ol.coordinate> offsetNumber - See:
Returns:
resulting coord
- Type
- Array.<ol.coordinates>
-
<static> splitH(geom, y, n)
-
Split a Polygon geom with horizontal lines
Parameters:
Name Type Description geomArray.<ol.coordinate> yNumber the y to split
nNumber contour index
Returns:
- Type
- Array.<Array.<ol.coordinate>>
-
<static> toDFCI(coord, level, projection)
-
Convert coordinate to French DFCI grid
Parameters:
Name Type Description coordol/coordinate levelnumber [0-3]
projectionol/proj/Projection of the coord, default EPSG:27572
Returns:
the DFCI index
- Type
- String
-
<static> validDFCI(index)
-
The string is a valid DFCI index
Parameters:
Name Type Description indexstring DFCI index
Returns:
- Type
- boolean
-
<static> validDFCICoord(coord, projection)
-
Coordinate is valid for DFCI
Parameters:
Name Type Description coordol/coordinate projectionol/proj/Projection result projection, default EPSG:27572
Returns:
- Type
- boolean
ol-ext