public class TLcdUTMZone extends Object implements Cloneable
TLcdUTMZone
extends Object
, it represents a UTM-MGRS zone.
The TLcdUTMZone
is determined by its zoneID,
which is a value between 0 and 60.
Due to different values for the false northing for the northern and the southern hemisphere all methods
involving calculations require a parameter indicating for which hemisphere the calculations
should be performed. Accepted values for the hemisphere are NORTHERN_HEMISPHERE
and
SOUTHERN_HEMISPHERE
.
Modifier and Type | Field and Description |
---|---|
static int |
NORTHERN_HEMISPHERE
Constant indicating that calculations should be performed for the northern hemisphere.
|
static int |
SOUTHERN_HEMISPHERE
Constant indicating that calculations should be performed for the southern hemisphere.
|
Constructor and Description |
---|
TLcdUTMZone()
Constructs a
TLcdUTMZone for zone 30. |
TLcdUTMZone(int aZoneID)
Constructs a
TLcdUTMZone for the given zone ID. |
TLcdUTMZone(int aZoneID,
ILcdGeodeticDatum aGeodeticDatum) |
Modifier and Type | Method and Description |
---|---|
void |
calculateLabelsStringSFCT(double aX,
double aY,
int aHemiSphere,
String[] aString)
Returns the labels of the four 100km zones surrounding a UTM-MGRS 100km grid point
of the
TLcdUTMZone . |
void |
calculateLabelsStringSFCT(double aX,
double aY,
String[] aString)
Deprecated.
use the method with the hemisphere parameter. This method calls that method
passing the northern hemisphere.
|
void |
calculateXBoundsSFCT(double aY,
double[] aLimitSFCT)
Deprecated.
use the method with the hemisphere parameter. This method calls the method, passing the
northern hemisphere.
|
void |
calculateXBoundsSFCT(double aY,
double[] aLimitSFCT,
int aHemiSphere)
Calculates the west and east bounds of this
TLcdUTMZone at the northing aY. |
void |
calculateXBoundsSFCT(double aX,
double aY,
double[] aLimitSFCT)
Deprecated.
|
void |
calculateXBoundsSFCT(double aX,
double aY,
double[] aLimitSFCT,
int aHemiSphere)
Given a northing aY, calculates the west and east bounds of this
TLcdUTMZone
in grid coordinates. |
Object |
clone() |
boolean |
contains(double aX,
double aY)
Deprecated.
use the method with the hemisphere.
|
boolean |
contains(double aX,
double aY,
int aHemiSphere)
Returns true if the coordinate is within the UTM zone, false otherwise..
|
double |
getCentralMeridian()
The centralMeridian is calculated on the basis of the zoneID.
|
ILcd2DEditableBounds |
getGeodeticBounds(int aHemisphere)
Calculates the geodetic bounds of this UTM zone.
|
ILcd2DEditableBounds |
getMaxXYBounds()
Deprecated.
use the method that passes the hemisphere. This method calls that method with the
norther hemisphere as parameter.
|
ILcd2DEditableBounds |
getMaxXYBounds(int aHemiSphere)
Calculates the maximal bounds in XY of this
TLcdUTMZone . |
TLcdUTMGrid |
getUTMGrid()
Returns an
ILcdModelReference representing the grid of the UTM zone. |
TLcdUTMGrid |
getUTMGridReference(int aHemiSphere) |
int |
getZoneID()
The zoneID fully identifies the
TLcdUTMZone . |
void |
grid2lonlatSFCT(double aX,
double aY,
ILcd3DEditablePoint a3DEditablePointSFCT)
Deprecated.
use the method with the hemisphere parameter. This method calls that method
with the northern hemisphere as parameter.
|
void |
grid2lonlatSFCT(double aX,
double aY,
int aHemiSphere,
ILcd3DEditablePoint a3DEditablePointSFCT)
Transformation of grid coordinate to LonLatHeight coordinate.
|
void |
grid2worldSFCT(double aX,
double aY,
ILcd3DEditablePoint a3DEditablePointSFCT)
Deprecated.
|
void |
grid2worldSFCT(double aX,
double aY,
int aHemiSphere,
ILcd3DEditablePoint a3DEditablePointSFCT)
Transformation of grid coordinate to world coordinate.
|
void |
lonlat2gridSFCT(double aLon,
double aLat,
ILcd2DEditablePoint aXYPointSFCT)
Deprecated.
|
void |
lonlat2gridSFCT(double aLon,
double aLat,
int aHemiSphere,
ILcd2DEditablePoint aXYPointSFCT)
Transformation of lon-lat coordinate to grid coordinate.
|
void |
setZoneID(int aZoneID)
Sets the new zoneID for this
TLcdUTMZone . |
void |
world2gridSFCT(ILcdPoint aWorldPoint,
ILcd2DEditablePoint aXYPointSFCT)
Deprecated.
|
void |
world2gridSFCT(ILcdPoint aWorldPoint,
int aHemiSphere,
ILcd2DEditablePoint aXYPointSFCT)
Transformation of world coordinate to grid coordinate.
|
public static final int NORTHERN_HEMISPHERE
public static final int SOUTHERN_HEMISPHERE
public TLcdUTMZone()
TLcdUTMZone
for zone 30.public TLcdUTMZone(int aZoneID)
TLcdUTMZone
for the given zone ID.aZoneID
- the ID of the zone.public TLcdUTMZone(int aZoneID, ILcdGeodeticDatum aGeodeticDatum)
public double getCentralMeridian()
TLcdUTMZone
.public int getZoneID()
TLcdUTMZone
. Its value is located between
0 and 60.TLcdUTMZone
.setZoneID(int)
public void setZoneID(int aZoneID)
TLcdUTMZone
.aZoneID
- the new zoneID for this TLcdUTMZone
.getZoneID()
public ILcd2DEditableBounds getMaxXYBounds()
TLcdUTMZone
.
This means that points with coordinates outside of the range of this bounds (i.e. with x
larger than the width, or y larger than the height), will certainly be outside this zone.
This does not guarantee however that points within these bounds are within this zone.ILcd2DEditableBounds
which represents the maximum bounds.public ILcd2DEditableBounds getMaxXYBounds(int aHemiSphere)
TLcdUTMZone
.
This means that points with coordinates outside of the range of this bounds (i.e. with x
larger than the width, or y larger than the height), will certainly be outside this zone.
This does not guarantee however that points within these bounds are within this zone.ILcd2DEditableBounds
which represents the maximum bounds.public ILcd2DEditableBounds getGeodeticBounds(int aHemisphere)
aHemisphere
- the hemisphereILcd2DEditableBounds
which represents the maximum bounds.public void calculateXBoundsSFCT(double aY, double[] aLimitSFCT) throws TLcdOutOfBoundsException
TLcdUTMZone
.aY
- the northing at which to calculate the bounds.aLimitSFCT
- array where the west and east bounds will be stored,
respectively at index 0 and at index 1.TLcdOutOfBoundsException
- if the specified coordinate is out of bounds.public void calculateXBoundsSFCT(double aX, double aY, double[] aLimitSFCT) throws TLcdOutOfBoundsException
TLcdUTMZone
at the northing level aY,.aX
- the easting of the point which' northing is aY.aY
- the northing at which to calculate the bounds.aLimitSFCT
- array where the west and east bounds will be stored,
respectively at index 0 and at index 1.TLcdOutOfBoundsException
- if the specified coordinate is out of bounds.public void calculateXBoundsSFCT(double aY, double[] aLimitSFCT, int aHemiSphere) throws TLcdOutOfBoundsException
TLcdUTMZone
at the northing aY.aY
- the northing at which to calculate the bounds.aLimitSFCT
- array where the west and east bounds will be stored,
respectively at index 0 and at index 1.TLcdOutOfBoundsException
- if the specified coordinate is out of bounds.public void calculateXBoundsSFCT(double aX, double aY, double[] aLimitSFCT, int aHemiSphere) throws TLcdOutOfBoundsException
TLcdUTMZone
in grid coordinates.aY
- the northing at which to calculate the bounds.aLimitSFCT
- array where the west and east bounds will be stored,
respectively at index 0 and at index 1.TLcdOutOfBoundsException
- if the specified coordinate is out of bounds.public boolean contains(double aX, double aY) throws TLcdOutOfBoundsException
aX
- the x-coordinate.aY
- the y-coordinate.TLcdOutOfBoundsException
- if the coordinate is out of bounds.public boolean contains(double aX, double aY, int aHemiSphere) throws TLcdOutOfBoundsException
aX
- the x-coordinate.aY
- the y-coordinate.TLcdOutOfBoundsException
- if the coordinate is out of bounds.public void grid2lonlatSFCT(double aX, double aY, ILcd3DEditablePoint a3DEditablePointSFCT) throws TLcdOutOfBoundsException
aX
- x-value of the grid coordinate.aY
- y-value of the grid coordinate.a3DEditablePointSFCT
- the resulting lon-lat-height coordinate as side effect.TLcdOutOfBoundsException
- The grid point (aX,aY)
is outside the valid area
of the projection.public void grid2lonlatSFCT(double aX, double aY, int aHemiSphere, ILcd3DEditablePoint a3DEditablePointSFCT) throws TLcdOutOfBoundsException
aX
- x-value of the grid coordinate.aY
- y-value of the grid coordinate.a3DEditablePointSFCT
- the resulting lon-lat-height coordinate as side effect.TLcdOutOfBoundsException
- The grid point (aX,aY)
is outside the valid area
of the projection.public void grid2worldSFCT(double aX, double aY, ILcd3DEditablePoint a3DEditablePointSFCT) throws TLcdOutOfBoundsException
aX
- x-value of the grid coordinate.aY
- y-value of the grid coordinate.a3DEditablePointSFCT
- the resulting world coordinate as side effect.TLcdOutOfBoundsException
- The grid point (aX,aY)
is outside the valid area
of the projection.public void grid2worldSFCT(double aX, double aY, int aHemiSphere, ILcd3DEditablePoint a3DEditablePointSFCT) throws TLcdOutOfBoundsException
aX
- x-value of the grid coordinate.aY
- y-value of the grid coordinate.a3DEditablePointSFCT
- the resulting world coordinate as side effect.TLcdOutOfBoundsException
- The grid point (aX,aY)
is outside the valid area
of the projection.public void world2gridSFCT(ILcdPoint aWorldPoint, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException
aWorldPoint
- the world coordinate.aXYPointSFCT
- the resulting grid coordinate as side effect.TLcdOutOfBoundsException
- The world point (aX,aY)
is outside the valid area
of the projection.public void world2gridSFCT(ILcdPoint aWorldPoint, int aHemiSphere, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException
aWorldPoint
- the world coordinate.aXYPointSFCT
- the resulting grid coordinate as side effect.TLcdOutOfBoundsException
- The world point (aX,aY)
is outside the valid area
of the projection.public void lonlat2gridSFCT(double aLon, double aLat, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException
aLon
- the longitude of the coordinate.aLat
- the latitude of the coordinate.aXYPointSFCT
- the resulting grid coordinate as side effect.TLcdOutOfBoundsException
- The lon-lat point (aLon,aLat)
is outside the valid area
of the projection.public void lonlat2gridSFCT(double aLon, double aLat, int aHemiSphere, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException
aLon
- the longitude of the coordinate.aLat
- the latitude of the coordinate.aXYPointSFCT
- the resulting grid coordinate as side effect.TLcdOutOfBoundsException
- The lon-lat point (aLon,aLat)
is outside the valid area
of the projection.public void calculateLabelsStringSFCT(double aX, double aY, String[] aString)
TLcdUTMZone
.aX
- the easting of the grid point.aY
- the northing of the grid point.aString
- an array of String
which will contain the resulting labels:
aString[0] : zone to the north-east of the grid point.
aString[1] : zone to the south-east of the grid point.
aString[2] : zone to the south-west of the grid point.
aString[3] : zone to the north-west of the grid point.public void calculateLabelsStringSFCT(double aX, double aY, int aHemiSphere, String[] aString)
TLcdUTMZone
.aX
- the easting of the grid point.aY
- the northing of the grid point.aString
- an array of String
which will contain the resulting labels:
aString[0] : zone to the north-east of the grid point.
aString[1] : zone to the south-east of the grid point.
aString[2] : zone to the south-west of the grid point.
aString[3] : zone to the north-west of the grid point.public TLcdUTMGrid getUTMGrid()
ILcdModelReference
representing the grid of the UTM zone.ILcdModelReference
representing the grid of the UTM zone.public TLcdUTMGrid getUTMGridReference(int aHemiSphere)