|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.jstott.jcoord.CoordinateSystem
uk.me.jstott.jcoord.UTMRef
public class UTMRef
This class is part of the Jcoord package. Visit the Jcoord website for more information.
Class to represent a Universal Transverse Mercator (UTM) reference.
(c) 2006 Jonathan Stott
Created on 11-Feb-2006
Constructor Summary | |
---|---|
UTMRef(double easting,
double northing,
char latZone,
int lngZone)
Deprecated. Use
instead. |
|
UTMRef(int lngZone,
char latZone,
double easting,
double northing)
Create a new UTM reference object. |
Method Summary | |
---|---|
double |
getEasting()
Get the easting. |
char |
getLatZone()
Get the latitude zone character. |
int |
getLngZone()
Get the longitude zone number. |
double |
getNorthing()
Get the northing. |
static char |
getUTMLatitudeZoneLetter(double latitude)
Work out the UTM latitude zone from the latitude. |
LatLng |
toLatLng()
Convert this UTM reference to a latitude and longitude. |
java.lang.String |
toString()
Convert this UTM reference to a String representation for printing out. |
Methods inherited from class uk.me.jstott.jcoord.CoordinateSystem |
---|
getDatum, setDatum |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UTMRef(double easting, double northing, char latZone, int lngZone) throws NotDefinedOnUTMGridException
UTMRef(int, char, double, double)
instead.
easting
- the easting in metres.northing
- the northing in metres.latZone
- the latitude zone character.lngZone
- the longitude zone number.
NotDefinedOnUTMGridException
- if any of the parameters are invalid. Be careful that a valid
value for the easting does not necessarily mean that the UTM
reference is well-formed. The current checks do not take into
account the varying range of valid values for the easting for
different latitudes.public UTMRef(int lngZone, char latZone, double easting, double northing) throws NotDefinedOnUTMGridException
lngZone
- the longitude zone number.latZone
- the latitude zone character.easting
- the easting in metres.northing
- the northing in metres.
NotDefinedOnUTMGridException
- if any of the parameters are invalid. Be careful that a valid
value for the easting does not necessarily mean that the UTM
reference is well-formed. The current checks do not take into
account the varying range of valid values for the easting for
different latitudes.Method Detail |
---|
public LatLng toLatLng()
toLatLng
in class CoordinateSystem
public static char getUTMLatitudeZoneLetter(double latitude)
latitude
- the latitude to find the UTM latitude zone for
public java.lang.String toString()
toString
in class java.lang.Object
public double getEasting()
public double getNorthing()
public char getLatZone()
public int getLngZone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |