new ol.Sphere(radius) experimental
src/ol/sphere/sphere.js, line 33
Name | Type | Description |
---|---|---|
radius |
number |
Radius. |
Methods
-
geodesicArea(coordinates){number} experimental
src/ol/sphere/sphere.js, line 74 -
Returns the geodesic area for a list of coordinates.
Reference Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion Laboratory, Pasadena, CA, June 2007
Name Type Description coordinates
Array.<ol.Coordinate> List of coordinates of a linear ring. If the ring is oriented clockwise, the area will be positive, otherwise it will be negative.
Returns:
Area.
-
haversineDistance(c1, c2){number} experimental
src/ol/sphere/sphere.js, line 145 -
Returns the distance from c1 to c2 using the haversine formula.
Name Type Description c1
ol.Coordinate Coordinate 1.
c2
ol.Coordinate Coordinate 2.
Returns:
Haversine distance.