Package com.massifmaps.projections
Class Projection
java.lang.Object
com.massifmaps.projections.Projection
An abstract base class for all projections.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.fromLatLong(double lat, double lng) Transforms a position given using latitutde-longitude coordinates from the WGS84 coordinate system to the coordinate system of this projection.Transforms a position from the WGS84 coordinate system to the coordinate system of this projection.Returns the bounds of this projection.getName()Return name of this projection in Well-Known format.inthashCode()Returns the hash value of this object.toLatLong(double x, double y) Transforms a position from the coordinate system of this projection to the WGS84 coordinate system latitude-longitute coordinates.Transforms a position from the coordinate system of this projection to the WGS84 coordinate system.
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getBounds
Returns the bounds of this projection.- Returns:
- The bounds of this projection.
-
fromWgs84
Transforms a position from the WGS84 coordinate system to the coordinate system of this projection.- Parameters:
pos- The position in the WGS84 coordinate system. It should be encoded as longitude-latitude.- Returns:
- The transformed position in the coordinate system of this projection.
-
toWgs84
Transforms a position from the coordinate system of this projection to the WGS84 coordinate system.- Parameters:
pos- The position in the coordinate system of this projection.- Returns:
- The transformed position in the WGS84 coordinate system. It is given as longitude-latitude.
-
fromLatLong
Transforms a position given using latitutde-longitude coordinates from the WGS84 coordinate system to the coordinate system of this projection.- Parameters:
lat- The latitude in the WGS84 coordinate system. It should be in range -90..90.lng- The longitude in the WGS84 coordinate system. It should be in range -180..180.- Returns:
- The transformed position in the coordinate system of this projection.
-
toLatLong
Transforms a position from the coordinate system of this projection to the WGS84 coordinate system latitude-longitute coordinates.- Parameters:
x- The x position in the coordinate system of this projection.y- The y position in the coordinate system of this projection.- Returns:
- The transformed position in the WGS84 coordinate system given as latitude-longitude.
-
getName
Return name of this projection in Well-Known format. For example, as "EPSG:3857"- Returns:
- The name of this projection.
-