public class TLcdUTMGrid extends TLcdGridReference
ILcdGridReference
represents a UTM grid reference.
It is characterized by zoneID
, which is a value between 1 and
60, inclusive, and a boolean flag northernHemisphere
, which
specifies the hemisphere.
Zone n corresponds to the region with longitudes ranging from
6*(n-31) degrees to * 6*(n-30) degrees.CARTESIAN, GEODETIC
Constructor and Description |
---|
TLcdUTMGrid()
Creates a new
TLcdUTMGrid for zone 30 on the northern hemisphere. |
TLcdUTMGrid(int aZoneID)
Creates a new
TLcdUTMGrid for the given zone on the northern
hemisphere. |
TLcdUTMGrid(int aZoneID,
boolean aNorthernHemisphere)
Creates a new
TLcdUTMGrid for the given zone and on the given
hemisphere. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes a deep clone of this grid reference.
|
double |
getCentralMeridian()
Gets the central meridian of the current
TLcdUTMGrid . |
String |
getName()
Returns a textual description of this reference.
|
int |
getZoneID()
Returns the zone ID that identifies the UTM zone.
|
boolean |
isNorthernHemisphere()
Returns whether the UTM zone lies in the northern hemisphere,
if
true , or in the southern hemisphere, if false . |
void |
loadProperties(String aPrefix,
Properties aProperties)
This method will retrieve the properties of this
TLcdUTMGrid ,
based on the given Properties object and the given prefix. |
void |
setFalseEasting(double aFalseEasting)
Sets the
falseEasting of the TLcdGridReference
to aFalseEasting . |
void |
setFalseNorthing(double aFalseNorthing)
Sets the
falseNorthing of the TLcdGridReference
to aFalseNorthing . |
void |
setGeodeticDatum(ILcdGeodeticDatum aGeodeticDatum)
Sets the geodetic datum this reference is based on.
|
void |
setName(String aName)
Sets a textual description of this reference.
|
void |
setNorthernHemisphere(boolean aNorthernHemisphere)
Sets the hemisphere of the UTM zone.
|
void |
setProjection(ILcdProjection aProjection)
Sets the
ILcdProjection of the TLcdGridReference
to aProjection . |
void |
setRotation(double aRotation)
Sets the rotation of this
ILcdGridReference in radians, clockwise. |
void |
setScale(double aScale)
Sets the
scale of the TLcdGridReference
to aScale . |
void |
setUnitOfMeasure(double aUnitOfMeasure)
Sets the UnitOfMeasure of the
TLcdGridReference
to aUnitOfMeasure . |
void |
setZoneID(int aZoneID)
Sets the zoneID of this
TLcdUTMGrid . |
String |
toString()
Returns the name of this grid reference if it is defined, calls super.toString otherwise.
|
void |
writePropertiesSFCT(String aPrefix,
Properties aPropertiesSFCT)
Stores the properties that define this model reference into the specified
Properties object as a side
effect. |
equals, get2DEditableBounds, getCoordinateType, getCosRotation, getFalseEasting, getFalseNorthing, getProjection, getRotation, getScale, getSinRotation, getUnitOfMeasure, hashCode, isBoundsAvailable, makeModelPoint
getGeodeticDatum, getModelReferenceMetadata, setModelReferenceMetadata
finalize, getClass, notify, notifyAll, wait, wait, wait
getGeodeticDatum
public TLcdUTMGrid()
TLcdUTMGrid
for zone 30 on the northern hemisphere.public TLcdUTMGrid(int aZoneID)
TLcdUTMGrid
for the given zone on the northern
hemisphere.aZoneID
- the zone ID of the UTM grid to use.public TLcdUTMGrid(int aZoneID, boolean aNorthernHemisphere)
TLcdUTMGrid
for the given zone and on the given
hemisphere.aZoneID
- the zone ID of the UTM grid to use.aNorthernHemisphere
- specifies that the zone lies in the northern
hemisphere, if true
, or in the
southern hemisphere, if false
.public void setProjection(ILcdProjection aProjection)
TLcdGridReference
ILcdProjection
of the TLcdGridReference
to aProjection
.setProjection
in class TLcdGridReference
aProjection
- the new projection value for this reference.TLcdGridReference.getProjection()
public void setGeodeticDatum(ILcdGeodeticDatum aGeodeticDatum)
ALcdGeoReference
setGeodeticDatum
in class ALcdGeoReference
aGeodeticDatum
- the geodetic datum this reference is based on.ALcdGeoReference.getGeodeticDatum()
public int getZoneID()
TLcdUTMGrid
.setZoneID(int)
public void setZoneID(int aZoneID)
TLcdUTMGrid
.aZoneID
- the new zone ID of this TLcdUTMGrid
.
The zone ID lies between 1 and 60.getZoneID()
public double getCentralMeridian()
TLcdUTMGrid
.TLcdUTMGrid
.public boolean isNorthernHemisphere()
true
, or in the southern hemisphere, if false
.true
, or in the southern hemisphere, if false
.public void setNorthernHemisphere(boolean aNorthernHemisphere)
aNorthernHemisphere
- specifies that the zone lies in the northern
hemisphere, if true
, or in the
southern hemisphere, if false
.public void setFalseEasting(double aFalseEasting)
TLcdGridReference
falseEasting
of the TLcdGridReference
to aFalseEasting
.setFalseEasting
in class TLcdGridReference
aFalseEasting
- the new false easting value for this reference
(defined in the unit of measure of this reference).TLcdGridReference.getFalseEasting()
public void setFalseNorthing(double aFalseNorthing)
TLcdGridReference
falseNorthing
of the TLcdGridReference
to aFalseNorthing
.setFalseNorthing
in class TLcdGridReference
aFalseNorthing
- the new false northing value for this reference
(defined in the unit of measure of this reference).TLcdGridReference.getFalseNorthing()
public void setScale(double aScale)
TLcdGridReference
scale
of the TLcdGridReference
to aScale
.setScale
in class TLcdGridReference
aScale
- the new scale value for this reference.TLcdGridReference.getScale()
public void setUnitOfMeasure(double aUnitOfMeasure)
TLcdGridReference
TLcdGridReference
to aUnitOfMeasure
.setUnitOfMeasure
in class TLcdGridReference
aUnitOfMeasure
- the new unitOfMeasure of this ILcdGridReference
w.r.t. meters.TLcdGridReference.getUnitOfMeasure()
public void setRotation(double aRotation)
TLcdGridReference
ILcdGridReference
in radians, clockwise. The center of the
rotation is the origin of the map projection.setRotation
in class TLcdGridReference
aRotation
- the new rotation value for this reference.TLcdGridReference.getRotation()
public void loadProperties(String aPrefix, Properties aProperties) throws IllegalArgumentException
TLcdUTMGrid
,
based on the given Properties
object and the given prefix.
The values of following required keys are retrieved:
TLcdGeodeticDatumFactory
.
The keys of those entries should begin with
'<aPrefix>.TLcdUTMGrid.geodeticDatum.'.loadProperties
in interface ILcdModelReference
loadProperties
in class TLcdGridReference
aPrefix
- a common prefix for all property names that are read.aProperties
- the properties to be parsed.IllegalArgumentException
- if the model reference cannot be constructed from the properties.TLcdGeodeticDatumFactory
public void writePropertiesSFCT(String aPrefix, Properties aPropertiesSFCT) throws IllegalArgumentException
ILcdModelReference
Properties
object as a side
effect.
Each particular implementation of this interface can define which properties it stores.writePropertiesSFCT
in interface ILcdModelReference
writePropertiesSFCT
in class TLcdGridReference
aPrefix
- a common prefix for all property names written.aPropertiesSFCT
- the properties that will contain the serialized
properties for this model reference, as a side effect.IllegalArgumentException
- if the model reference cannot be serialized into properties.loadProperties(java.lang.String, java.util.Properties)
public void setName(String aName)
setName
in class ALcdGeoReference
aName
- a textual description of this reference.getName()
public String getName()
getName
in class ALcdGeoReference
setName(String)
public String toString()
TLcdGridReference
toString
in class TLcdGridReference
public Object clone()
TLcdGridReference
clone
in interface ILcdCloneable
clone
in class TLcdGridReference
Object.clone()