|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjwo.landserf.process.proj.UTM
Class for representing Universal Transverse Mercator projections. Includes forward and inverse transforms from/to lat,long. Uses transformation equations from Snyder (1987) Atlas of Map Projections, and the Ordnance Survey (2002) National GPS Network Information. If explicit projection origins are not given, an appropriate UTM zone should be set before transforming in either directionn. This can be dertermined by passing a reasonably central lat/long coordinate pair to the constructor.
Field Summary | |
static int |
FROM_LAT_LONG
Indicates a transformation from lat/lng |
static int |
TO_LAT_LONG
Indicates a transformation to lat/lng |
Constructor Summary | |
UTM(Ellipsoid ellipsoid,
float lat,
float lng)
Initialises the UTM converter with the given ellipsoid. |
|
UTM(Ellipsoid ellipsoid,
int zoneNumber,
char zoneLetter)
Initialises the UTM converter with the given ellipsoid and zone. |
Method Summary | |
boolean |
doInterpolation()
Indicates whether the transformation should use nearest neighbour (false) or some interpolator (true). |
String |
getDescription()
Provides a general description of the transformation. |
Ellipsoid |
getEllipsoid()
Reports the ellipsoid used in the transformation. |
String |
getZone()
Reports the full UTM zone of the given (lat,lng) location. |
char |
getZoneLetter()
Reports the UTM zone letter of the given (lat,lng) location. |
int |
getZoneNumber()
Reports the UTM zone number of the given (lat,lng) location. |
Footprint |
invTransformCoords(Footprint fpIn)
Performs an inverse UTM transform on the given location. |
Footprint |
latLongToUTM(float lng,
float lat)
Converts the given (lat,lng) coordinates into a UTM location. |
Footprint |
latLongToUTM(float lng,
float lat,
double lngOrigin,
double latOrigin,
double xOffset,
double yOffset,
double scaleFactor)
Converts the given (lat,lng) coordinates into a UTM location using the given scale factor and origins. |
void |
setInterpolation(boolean doInterpolation)
Sets whether the transformation should use nearest neighbour (false) or some interpolator (true). |
void |
setZone(float lat,
float lng)
Sets the UTM zone determined by the given (lat,lng) location. |
void |
setZone(int zoneNumber,
char zoneLetter)
Sets the zone number and letter for subsequent transformations. |
Footprint |
transformCoords(Footprint fpIn)
Performs a forward transform on the given location. |
Footprint |
UTMToLatLong(float easting,
float northing)
Converts the given UTM coordinates into a (lat,lng) location. |
Footprint |
UTMToLatLong(float easting,
float northing,
double lngOrigin,
double latOrigin,
double xOffset,
double yOffset,
double scaleFactor)
Converts the given UTM coordinates intto a (lat,lng) location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FROM_LAT_LONG
public static final int TO_LAT_LONG
Constructor Detail |
public UTM(Ellipsoid ellipsoid, int zoneNumber, char zoneLetter)
ellipsoid
- to use in projection.zoneNumber
- Zone number of UTM projection.zoneLetter
- Zone letter of UTM projection.public UTM(Ellipsoid ellipsoid, float lat, float lng)
ellipsoid
- to use in projection.lat
- Initial latitude coordinate.lng
- Initial longitude coordinate.Method Detail |
public Footprint transformCoords(Footprint fpIn)
transformCoords
in interface Transformable
fpIn
- Incoming footprint to transform.
public Footprint invTransformCoords(Footprint fpIn)
invTransformCoords
in interface Transformable
fpIn
- Incoming footprint to transform.
public String getDescription()
getDescription
in interface Transformable
public boolean doInterpolation()
doInterpolation
in interface Transformable
public void setInterpolation(boolean doInterpolation)
doInterpolation
- True if transformation should perform some local interpolation.public Footprint latLongToUTM(float lng, float lat)
lng
- Longitude (+-180)lat
- Latitude (+-90)
public Footprint latLongToUTM(float lng, float lat, double lngOrigin, double latOrigin, double xOffset, double yOffset, double scaleFactor)
lng
- Longitude (+-180.0).lat
- Latitude (+-90.0).lngOrigin
- Origin longitude (+-180.0).latOrigin
- Origin latitude (+-90.0).xOffset
- UTM coordinate X origin.yOffset
- UTM coordinate Y origin.scaleFactor
- Scale factor on central meridian used in transformation.
public Footprint UTMToLatLong(float easting, float northing)
easting
- UTM x coordinate.northing
- UTM y coordinate.
public Footprint UTMToLatLong(float easting, float northing, double lngOrigin, double latOrigin, double xOffset, double yOffset, double scaleFactor)
easting
- UTM x coordinate.northing
- UTM y coordinate.lngOrigin
- Origin longitude (+-180)latOrigin
- Origin latitude (+-90)xOffset
- UTM coordinate X origin.yOffset
- UTM coordinate Y origin.scaleFactor
- Scale factor on central meridian used in transformation.
public void setZone(float lat, float lng)
lat
- Latitude (+-90)lng
- Longitude (+-180)public void setZone(int zoneNumber, char zoneLetter)
zoneNumber
- Zone number to use.zoneLetter
- Zone letter to use.public int getZoneNumber()
public char getZoneLetter()
public String getZone()
public Ellipsoid getEllipsoid()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |