public class TLcdGridReference extends ALcdGeoReference implements ILcdGridReference, ILcdXYWorldReference, ILcdXYZWorldReference
TLcdGridReference
is an implementation of an
ILcdGridReference
.CARTESIAN, GEODETIC
Constructor and Description |
---|
TLcdGridReference()
Default constructor.
|
TLcdGridReference(ILcdGeodeticDatum aGeodeticDatum,
ILcdProjection aProjection)
Constructor taking geodetic datum and projection as arguments.
|
TLcdGridReference(ILcdGeodeticDatum aGeodeticDatum,
ILcdProjection aProjection,
double aFalseEasting,
double aFalseNorthing,
double aScale,
double aUnitOfMeasure,
double aRotation)
Constructor with all possible properties as arguments.
|
TLcdGridReference(ILcdGridReference aGridReference)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes a deep clone of this grid reference.
|
boolean |
equals(Object aObject)
Checks on all parameters, except for the name.
|
ILcd2DEditableBounds |
get2DEditableBounds()
This method returns the bounds of the grid system.
|
int |
getCoordinateType()
Returns the type of coordinates used with this
ILcdGeoReference :
CARTESIAN or GEODETIC . |
double |
getCosRotation()
Returns the cosine of the rotation of this
ILcdGridReference . |
double |
getFalseEasting()
Returns the false easting of this
ILcdGridReference . |
double |
getFalseNorthing()
Returns the false northing of this
ILcdGridReference . |
ILcdProjection |
getProjection()
Returns the
ILcdProjection of this ILcdGridReference . |
double |
getRotation()
Returns the rotation of this
ILcdGridReference in radians, clockwise. |
double |
getScale()
Returns the scale of this
ILcdGridReference . |
double |
getSinRotation()
Returns the sine of the rotation of this
ILcdGridReference . |
double |
getUnitOfMeasure()
Returns the unitOfMeasure of this
ILcdGridReference
w.r.t. to meters. |
int |
hashCode() |
boolean |
isBoundsAvailable()
Returns if this
ILcdXYWorldReference has bounds available. |
void |
loadProperties(String aPrefix,
Properties aProperties)
This method will, given
aPrefix , analyze the
Properties object aProperties
to set the properties of this TLcdGridReference . |
ILcdPoint |
makeModelPoint()
Creates a model point that is compatible with this model reference.
|
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 |
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 . |
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. |
getGeodeticDatum, getModelReferenceMetadata, getName, setGeodeticDatum, setModelReferenceMetadata, setName
finalize, getClass, notify, notifyAll, wait, wait, wait
getGeodeticDatum
public TLcdGridReference()
public TLcdGridReference(ILcdGeodeticDatum aGeodeticDatum, ILcdProjection aProjection)
aGeodeticDatum
- the geodetic datum for this reference.aProjection
- the projection for this reference.public TLcdGridReference(ILcdGeodeticDatum aGeodeticDatum, ILcdProjection aProjection, double aFalseEasting, double aFalseNorthing, double aScale, double aUnitOfMeasure, double aRotation)
aGeodeticDatum
- the geodetic datum for this reference.aProjection
- the projection for this reference.aFalseEasting
- the false easting (defined in the unitOfMeasure).aFalseNorthing
- the false northing (defined in the unitOfMeasure).aScale
- a scale factor applied after the projection.aUnitOfMeasure
- the unit of measure of this grid reference.aRotation
- the rotation value for this reference (RADIANs!).public TLcdGridReference(ILcdGridReference aGridReference)
aGridReference
- the grid reference to be cloned.public int getCoordinateType()
ILcdGeoReference
ILcdGeoReference
:
CARTESIAN
or GEODETIC
.getCoordinateType
in interface ILcdGeoReference
ILcdGeoReference
:
CARTESIAN
or GEODETIC
.public ILcdProjection getProjection()
ILcdGridReference
ILcdProjection
of this ILcdGridReference
.getProjection
in interface ILcdGridReference
ILcdProjection
of this ILcdGridReference
.ILcdGridReference.getProjection()
public void setProjection(ILcdProjection aProjection)
ILcdProjection
of the TLcdGridReference
to aProjection
.aProjection
- the new projection value for this reference.getProjection()
public double getFalseEasting()
ILcdGridReference
ILcdGridReference
.
It is defined in the unit of the grid system.getFalseEasting
in interface ILcdGridReference
ILcdGridReference
.
It is defined in the unit of the grid system.ILcdGridReference.getFalseEasting()
public void setFalseEasting(double aFalseEasting)
falseEasting
of the TLcdGridReference
to aFalseEasting
.aFalseEasting
- the new false easting value for this reference
(defined in the unit of measure of this reference).getFalseEasting()
public double getFalseNorthing()
ILcdGridReference
ILcdGridReference
.
It is defined in the unit of the grid system.getFalseNorthing
in interface ILcdGridReference
ILcdGridReference
.
It is defined in the unit of the grid system.ILcdGridReference.getFalseNorthing()
public void setFalseNorthing(double aFalseNorthing)
falseNorthing
of the TLcdGridReference
to aFalseNorthing
.aFalseNorthing
- the new false northing value for this reference
(defined in the unit of measure of this reference).getFalseNorthing()
public double getScale()
ILcdGridReference
ILcdGridReference
.getScale
in interface ILcdGridReference
ILcdGridReference
.ILcdGridReference.getScale()
public void setScale(double aScale)
scale
of the TLcdGridReference
to aScale
.aScale
- the new scale value for this reference.getScale()
public double getRotation()
ILcdGridReference
in radians, clockwise. The center of the
rotation is the origin of the map projection.getRotation
in interface ILcdGridReference
ILcdGridReference
in radians.public void setRotation(double aRotation)
ILcdGridReference
in radians, clockwise. The center of the
rotation is the origin of the map projection.aRotation
- the new rotation value for this reference.getRotation()
public double getCosRotation()
ILcdGridReference
ILcdGridReference
.getCosRotation
in interface ILcdGridReference
ILcdGridReference
.ILcdGridReference.getCosRotation()
public double getSinRotation()
ILcdGridReference
ILcdGridReference
.getSinRotation
in interface ILcdGridReference
ILcdGridReference
.ILcdGridReference.getSinRotation()
public ILcdPoint makeModelPoint()
ILcdModelReference
makeModelPoint
in interface ILcdModelReference
public void loadProperties(String aPrefix, Properties aProperties) throws IllegalArgumentException
aPrefix
, analyze the
Properties
object aProperties
to set the properties of this TLcdGridReference
.
The values of following keys are retrieved:
aProperties
should contain
entries which will be analyzed by the TLcdProjectionFactory
.
The keys of those entries should begin with '<aPrefix>TLcdGridReference.projection.'.
To be able to set the property geodeticDatum the aProperties should contain
entries which will be analyzed by the TLcdGeodeticDatumFactory
.
The keys of those entries should begin with
'<aPrefix>.TLcdGridReference.geodeticDatum.'.
The properties object is also passed to the TLcdModelReferenceMetadata.loadProperties(java.lang.String, java.util.Properties)
with the prefix "<aPrefix>.TLcdGridReference."
loadProperties
in interface ILcdModelReference
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.TLcdProjectionFactory
,
TLcdGeodeticDatumFactory
,
TLcdModelReferenceMetadata
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
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 double getUnitOfMeasure()
ILcdGridReference
ILcdGridReference
w.r.t. to meters. So, if the unit of the grid reference would
be millimeters, this becomes 0.001.getUnitOfMeasure
in interface ILcdGridReference
ILcdGridReference
w.r.t. meters. So, if the unit of the grid reference would
be millimeters, this becomes 0.001.public void setUnitOfMeasure(double aUnitOfMeasure)
TLcdGridReference
to aUnitOfMeasure
.aUnitOfMeasure
- the new unitOfMeasure of this ILcdGridReference
w.r.t. meters.getUnitOfMeasure()
public boolean isBoundsAvailable()
ILcdXYWorldReference
ILcdXYWorldReference
has bounds available.isBoundsAvailable
in interface ILcdXYWorldReference
true
if a 2DEditable bounds is available, false otherwise.ILcdXYWorldReference.get2DEditableBounds()
public ILcd2DEditableBounds get2DEditableBounds()
get2DEditableBounds
in interface ILcdXYWorldReference
isBoundsAvailable()
, a ILcd2DEditableBounds
that contains
all the 2D shapes of all the objects in world coordinates
using the given ILcdXYWorldReference
.
Returns only a valid value if isBoundsAvailable()
is true
;.public boolean equals(Object aObject)
equals
in class ALcdGeoReference
aObject
- the object to check for equality.public int hashCode()
hashCode
in class ALcdGeoReference
public Object clone()
clone
in interface ILcdCloneable
clone
in class ALcdGeoReference
Object.clone()