public class TLcdKML22Location extends TLcdKML22AbstractObject implements ILcd3DEditablePoint
OGC KML Specification description:
This element can be used wherever the following element is referenced: -kml:AbstractObjectGroup Specifies the coordinates of a location. A kml:Location element should contain the kml:longitude, kml:latitude child elements outside of an update context, that is when not a descendant of kml:Update.
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
ALTITUDE_PROPERTY
Data property that maps to the
altitude element. |
static TLcdDataProperty |
LATITUDE_PROPERTY
Data property that maps to the
latitude element. |
static TLcdDataProperty |
LOCATION_OBJECT_EXTENSION_GROUP_PROPERTY
Data property that maps to the
LocationObjectExtensionGroup element. |
static TLcdDataProperty |
LOCATION_SIMPLE_EXTENSION_GROUP_PROPERTY
Data property that maps to the
LocationSimpleExtensionGroup element. |
static TLcdDataProperty |
LONGITUDE_PROPERTY
Data property that maps to the
longitude element. |
ID_PROPERTY, OBJECT_SIMPLE_EXTENSION_GROUP_PROPERTY, TARGET_ID_PROPERTY
Constructor and Description |
---|
TLcdKML22Location()
Creates a new
TLcdKML22Location with its default TLcdDataType . |
TLcdKML22Location(TLcdDataType aType)
Creates a new
TLcdKML22Location with a custom TLcdDataType . |
Modifier and Type | Method and Description |
---|---|
ILcd2DEditablePoint |
cloneAs2DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd2DEditablePoint . |
ILcd3DEditablePoint |
cloneAs3DEditablePoint()
Returns a copy of this
ILcdPoint that is also an ILcd3DEditablePoint . |
boolean |
contains2D(double aX,
double v)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double aX,
double v,
double aY)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
boolean |
equals(Object aObject)
Checks whether this
ILcdPoint is equal to the given Object . |
Double |
getAltitude()
Returns the value of the property that maps to the
altitude element. |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
double |
getCosX()
Returns cos(
getX() * DEG2RAD ). |
double |
getCosY()
Returns cos(
getY() * DEG2RAD ). |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
Double |
getLatitude()
Returns the value of the property that maps to the
latitude element. |
Double |
getLongitude()
Returns the value of the property that maps to the
longitude element. |
double |
getSinX()
Returns sin(
getX() * DEG2RAD ). |
double |
getSinY()
Returns sin(
getY() * DEG2RAD ). |
double |
getTanX()
Returns tan(
getX() * DEG2RAD ). |
double |
getTanY()
Returns tan(
getY() * DEG2RAD ). |
double |
getX()
Returns the x coordinate of this
ILcdPoint . |
double |
getY()
Returns the y coordinate of this
ILcdPoint . |
double |
getZ()
Returns the z coordinate of this
ILcdPoint . |
int |
hashCode() |
void |
move2D(double aX,
double v)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move2D(ILcdPoint a2DEditablePoint)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move3D(double aLon,
double v,
double aLat)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
move3D(ILcdPoint aPoint)
Moves this
ILcd3DEditableShape to the given point in the 3D space. |
void |
setAltitude(Double aValue)
Sets the value of the property that maps to the
altitude element. |
void |
setLatitude(Double aValue)
Sets the value of the property that maps to the
latitude element. |
void |
setLongitude(Double aValue)
Sets the value of the property that maps to the
longitude element. |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
String |
toString() |
void |
translate2D(double aDeltaX,
double v)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
void |
translate3D(double aDeltaX,
double v,
double aDeltaY)
Translates this
ILcd3DEditableShape from its current position over the given translation
vector in the 3D space. |
getId, getTargetId, setId, setTargetId
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, setValue
finalize, getClass, notify, notifyAll, wait, wait, wait
clone
public static final TLcdDataProperty LONGITUDE_PROPERTY
longitude
element.
The possible values for this property are instances of Double
.public static final TLcdDataProperty LATITUDE_PROPERTY
latitude
element.
The possible values for this property are instances of Double
.public static final TLcdDataProperty ALTITUDE_PROPERTY
altitude
element.
The possible values for this property are instances of Double
.public static final TLcdDataProperty LOCATION_SIMPLE_EXTENSION_GROUP_PROPERTY
LocationSimpleExtensionGroup
element.
The possible values for this property are instances of List<String>
.public static final TLcdDataProperty LOCATION_OBJECT_EXTENSION_GROUP_PROPERTY
LocationObjectExtensionGroup
element.
The possible values for this property are instances of List<TLcdKML22AbstractObject>
.public TLcdKML22Location()
TLcdKML22Location
with its default TLcdDataType
.public TLcdKML22Location(TLcdDataType aType)
TLcdKML22Location
with a custom TLcdDataType
.aType
- a custom TLcdDataType
public void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public double getX()
ILcdPoint
ILcdPoint
.public double getY()
ILcdPoint
ILcdPoint
.public double getZ()
ILcdPoint
ILcdPoint
.public double getCosY()
ILcdPoint
getY()
* DEG2RAD ).public double getCosX()
ILcdPoint
getX()
* DEG2RAD ).public double getSinY()
ILcdPoint
getY()
* DEG2RAD ).public double getSinX()
ILcdPoint
getX()
* DEG2RAD ).public double getTanY()
ILcdPoint
getY()
* DEG2RAD ).public double getTanX()
ILcdPoint
getX()
* DEG2RAD ).public void move3D(double aLon, double v, double aLat)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
aLon
- the x coordinate of the point.v
- the y coordinate of the point.aLat
- the z coordinate of the point.public ILcd2DEditablePoint cloneAs2DEditablePoint()
ILcdPoint
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,cloneAs2DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd2DEditablePoint
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd2DEditablePoint
public ILcd3DEditablePoint cloneAs3DEditablePoint()
ILcdPoint
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,cloneAs3DEditablePoint
in interface ILcdPoint
ILcdPoint
that is also an ILcd3DEditablePoint
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdPoint
object may be read-only.ILcd3DEditablePoint
public void move2D(double aX, double v)
ILcd2DEditableShape
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aX
- the x coordinate of the point.v
- the y coordinate of the point.public void move3D(ILcdPoint aPoint)
ILcd3DEditableShape
ILcd3DEditableShape
to the given point in the 3D space. The focus point
is used as the handle by which the shape is moved.move3D
in interface ILcd3DEditableShape
aPoint
- the ILcdPoint
to move to.ILcd3DEditableShape.move3D(double, double, double)
public void translate3D(double aDeltaX, double v, double aDeltaY)
ILcd3DEditableShape
ILcd3DEditableShape
from its current position over the given translation
vector in the 3D space.translate3D
in interface ILcd3DEditableShape
aDeltaX
- the x coordinate of the translation vector.v
- the y coordinate of the translation vector.aDeltaY
- the z coordinate of the translation vector.public String toString()
toString
in class TLcdDataObject
public void move2D(ILcdPoint a2DEditablePoint)
ILcd2DEditableShape
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
and the ILcdPoint
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
a2DEditablePoint
- the ILcdPoint
to move to.ILcd2DEditableShape.move2D(double, double)
public void translate2D(double aDeltaX, double v)
ILcd2DEditableShape
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditableShape
aDeltaX
- the x coordinate of the translation vector.v
- the y coordinate of the translation vector.public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public boolean contains2D(double aX, double v)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
aX
- the x coordinate of the point.v
- the y coordinate of the point.public boolean contains3D(double aX, double v, double aY)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
aX
- the x coordinate of the point.v
- the y coordinate of the point.aY
- the z coordinate of the point.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public boolean equals(Object aObject)
ILcdPoint
ILcdPoint
is equal to the given Object
.equals
in interface ILcdPoint
equals
in class Object
aObject
- the Object
to compare to.public boolean contains2D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains3D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public Double getLongitude()
longitude
element.LONGITUDE_PROPERTY
property.public void setLongitude(Double aValue)
longitude
element.aValue
- the value to set for the LONGITUDE_PROPERTY
property.public Double getLatitude()
latitude
element.LATITUDE_PROPERTY
property.public void setLatitude(Double aValue)
latitude
element.aValue
- the value to set for the LATITUDE_PROPERTY
property.public Double getAltitude()
altitude
element.ALTITUDE_PROPERTY
property.public void setAltitude(Double aValue)
altitude
element.aValue
- the value to set for the ALTITUDE_PROPERTY
property.