public class ObliqueMercator extends java.lang.Object implements MapProjection
Modifier and Type | Field and Description |
---|---|
static int |
FROM_LAT_LONG
Indicates a transformation from longitude/latitude
|
static int |
TO_LAT_LONG
Indicates a transformation to longitude/latitude
|
Constructor and Description |
---|
ObliqueMercator(Ellipsoid ellipsoid)
Initialises the Oblique Mercator converter with the given ellipsoid.
|
Modifier and Type | Method and Description |
---|---|
boolean |
doInterpolation()
Indicates whether the transformation should use nearest neighbour (false)
or some interpolator (true).
|
java.lang.String |
getDescription()
Provides a general description of the transformation.
|
Ellipsoid |
getEllipsoid()
Reports the ellipsoid used in the transformation.
|
processing.core.PVector |
invTransformCoords(processing.core.PVector p)
Performs an inverse Oblique Mercator to lat/long transform on the given location.
|
processing.core.PVector |
latLongToObliqueMercator(processing.core.PVector p)
Converts the given (
lat ,lng ) coordinates into an oblique Mercator location. |
processing.core.PVector |
obliqueMercatorToLatLong(processing.core.PVector p)
Converts the given Oblique Mercator coordinates into a longitude/latitude location.
|
void |
setInterpolation(boolean doInterpolation)
Sets whether the transformation should use nearest neighbour (false)
or some interpolator (true).
|
processing.core.PVector |
transformCoords(processing.core.PVector p)
Performs a forward longitude/latitude to Oblique Mercator transform on the given location.
|
public static final int FROM_LAT_LONG
public static final int TO_LAT_LONG
public ObliqueMercator(Ellipsoid ellipsoid)
ellipsoid
- to use in projection.public processing.core.PVector transformCoords(processing.core.PVector p)
transformCoords
in interface MapProjection
p
- point coordinates to transform.public processing.core.PVector invTransformCoords(processing.core.PVector p)
invTransformCoords
in interface MapProjection
p
- Point coordinates to transformpublic java.lang.String getDescription()
getDescription
in interface MapProjection
public boolean doInterpolation()
public void setInterpolation(boolean doInterpolation)
doInterpolation
- True if transformation should perform some local interpolation.public processing.core.PVector latLongToObliqueMercator(processing.core.PVector p)
lat
,lng
) coordinates into an oblique Mercator location.
Longitude/latitude should be in decimal degrees with positive North and positive East.p
- Longitude/latitude point. Longitude varies within +-180 degrees, latitude within +-90 degrees.public processing.core.PVector obliqueMercatorToLatLong(processing.core.PVector p)
p
- Location of point as an easting and northing in the Oblique Mercator projection (metres from local origin).public Ellipsoid getEllipsoid()