Class SinusoidalProjection
java.lang.Object
com.here.platform.location.core.geospatial.SinusoidalProjection
A simple and fast
GeoProjection
used for most
use cases.
The error is less than 1% for distances up to 10km when the latitude is between +85 and -85 degrees.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProjectionDistanceCalculator
static <CGC,
C> GeoCoordinate from
(CGC center, C coordinates, GeoCoordinateOperations<CGC> evidence$4, CoordinateOperations<C> evidence$5) Projects back to WGS84 coordinates (in degrees) from Cartesian coordinates (in meters).static <CGC,
GC> Coordinate2D to
(CGC center, GC p, GeoCoordinateOperations<CGC> evidence$1, GeoCoordinateOperations<GC> evidence$2) Projects WGS84 coordinates (in degrees) into Cartesian coordinates (in meters).static <GC> Coordinate2D
toCenter
(GC center, GeoCoordinateOperations<GC> evidence$3)
-
Constructor Details
-
SinusoidalProjection
public SinusoidalProjection()
-
-
Method Details
-
to
public static <CGC,GC> Coordinate2D to(CGC center, GC p, GeoCoordinateOperations<CGC> evidence$1, GeoCoordinateOperations<GC> evidence$2) Projects WGS84 coordinates (in degrees) into Cartesian coordinates (in meters).- Parameters:
center
- The center of the projection, needs to be the same for all points that take part in the following computation (e.g. distance) and the same center should be used to then project resulting coordinates back into WGS84.p
- The point to be projected- Type Parameters:
- CGC The type of the WGS84 coordinates of the projection center, GC The type of the WGS84 coordinates of the point to be projected
-
toCenter
-
from
public static <CGC,C> GeoCoordinate from(CGC center, C coordinates, GeoCoordinateOperations<CGC> evidence$4, CoordinateOperations<C> evidence$5) Projects back to WGS84 coordinates (in degrees) from Cartesian coordinates (in meters).Should not be used for latitudes within 0.001 degrees from any of the poles (equivalent to 90 or -90), since the behavior becomes random due to calculation limitations (division by value close to zero).
- Parameters:
center
- The center of the projectioncoordinates
- The Cartesian coordinates, near the center, to be projected back to WGS84
-
DistanceCalculator
-