Class: ol.Sphere

ol.Sphere

new Sphere

Parameters:
Name Type Description
radius number Radius.
Source:
  • sphere.js, line 22

Members

radius :number

Source:
  • sphere.js, line 27

Methods

cosineDistance

Returns the distance from c1 to c2 using the spherical law of cosines.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate 1.
c2 ol.Coordinate Coordinate 2.
Source:
  • sphere.js, line 39
Returns:
Spherical law of cosines distance.
Type
number

crossTrackDistance

Returns the distance of c3 from the great circle path defined by c1 and c2.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate 1.
c2 ol.Coordinate Coordinate 2.
c3 ol.Coordinate Coordinate 3.
Source:
  • sphere.js, line 57
Returns:
Cross-track distance.
Type
number

equirectangularDistance

Returns the distance from c1 to c2 using Pythagoras's theorem on an equirectangular projection.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate 1.
c2 ol.Coordinate Coordinate 2.
Source:
  • sphere.js, line 75
Returns:
Equirectangular distance.
Type
number

finalBearing

Returns the final bearing from c1 to c2.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate 1.
c2 ol.Coordinate Coordinate 2.
Source:
  • sphere.js, line 92
Returns:
Initial bearing.
Type
number

haversineDistance

Returns the distance from c1 to c2 using the haversine formula.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate 1.
c2 ol.Coordinate Coordinate 2.
Source:
  • sphere.js, line 104
Returns:
Haversine distance.
Type
number

initialBearing

Returns the initial bearing from c1 to c2.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate 1.
c2 ol.Coordinate Coordinate 2.
Source:
  • sphere.js, line 123
Returns:
Initial bearing.
Type
number

maximumLatitude

Returns the maximum latitude of the great circle defined by bearing and latitude.
Parameters:
Name Type Description
bearing number Bearing.
latitude number Latitude.
Source:
  • sphere.js, line 142
Returns:
Maximum latitude.
Type
number

midpoint

Returns the midpoint between c1 and c2.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate 1.
c2 ol.Coordinate Coordinate 2.
Source:
  • sphere.js, line 155
Returns:
Midpoint.
Type
ol.Coordinate

offset

Returns the coordinate at the given distance and bearing from c.
Parameters:
Name Type Description
c1 ol.Coordinate Coordinate.
distance number Distance.
bearing number Bearing.
Source:
  • sphere.js, line 178
Returns:
Coordinate.
Type
ol.Coordinate