Class TLcdKML22Location
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.format.kml22.model.TLcdKML22AbstractObject
com.luciad.format.kml22.model.geometry.TLcdKML22Location
- All Implemented Interfaces:
ILcdDataObject
,ILcdBounded
,ILcdPoint
,ILcdShape
,ILcd2DEditablePoint
,ILcd2DEditableShape
,ILcd3DEditablePoint
,ILcd3DEditableShape
,ILcdCloneable
,ILcdDeepCloneable
,Serializable
,Cloneable
Domain class modeling the KML LocationType type.
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.
- Since:
- 10.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TLcdDataProperty
Data property that maps to thealtitude
element.static final TLcdDataProperty
Data property that maps to thelatitude
element.static final TLcdDataProperty
Data property that maps to theLocationObjectExtensionGroup
element.static final TLcdDataProperty
Data property that maps to theLocationSimpleExtensionGroup
element.static final TLcdDataProperty
Data property that maps to thelongitude
element.Fields inherited from class com.luciad.format.kml22.model.TLcdKML22AbstractObject
ID_PROPERTY, OBJECT_SIMPLE_EXTENSION_GROUP_PROPERTY, TARGET_ID_PROPERTY
-
Constructor Summary
ConstructorDescriptionCreates a newTLcdKML22Location
with its defaultTLcdDataType
.TLcdKML22Location
(TLcdDataType aType) Creates a newTLcdKML22Location
with a customTLcdDataType
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of thisILcdPoint
that is also anILcd2DEditablePoint
.Returns a copy of thisILcdPoint
that is also anILcd3DEditablePoint
.boolean
contains2D
(double aX, double v) Checks whether thisILcdShape
contains the given point in the 2D space.boolean
contains2D
(ILcdPoint aPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 2D space.boolean
contains3D
(double aX, double v, double aY) Checks whether thisILcdShape
contains the given point in the 3D space.boolean
contains3D
(ILcdPoint aPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.boolean
Checks whether thisILcdPoint
is equal to the givenObject
.Returns the value of the property that maps to thealtitude
element.Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.double
getCosX()
Returns cos(getX()
* DEG2RAD ).double
getCosY()
Returns cos(getY()
* DEG2RAD ).Returns the focus point of thisILcdShape
.Returns the value of the property that maps to thelatitude
element.Returns the value of the property that maps to thelongitude
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 thisILcdPoint
.double
getY()
Returns the y coordinate of thisILcdPoint
.double
getZ()
Returns the z coordinate of thisILcdPoint
.int
hashCode()
void
move2D
(double aX, double v) Moves thisILcd2DEditableShape
to the given point in the 2D space.void
Moves thisILcd2DEditableShape
to the given point in the 2D space.void
move3D
(double aLon, double v, double aLat) Moves thisILcd3DEditableShape
to the given point in the 3D space.void
Moves thisILcd3DEditableShape
to the given point in the 3D space.void
setAltitude
(Double aValue) Sets the value of the property that maps to thealtitude
element.void
setLatitude
(Double aValue) Sets the value of the property that maps to thelatitude
element.void
setLongitude
(Double aValue) Sets the value of the property that maps to thelongitude
element.void
setValue
(TLcdDataProperty aProperty, Object aValue) Sets the value of the given property for this data object.toString()
void
translate2D
(double aDeltaX, double v) Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space.void
translate3D
(double aDeltaX, double v, double aDeltaY) Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.format.kml22.model.TLcdKML22AbstractObject
getId, getTargetId, setId, setTargetId
Methods inherited from class com.luciad.datamodel.TLcdDataObject
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, setValue
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdCloneable
clone
-
Field Details
-
LONGITUDE_PROPERTY
Data property that maps to thelongitude
element. The possible values for this property are instances ofDouble
. -
LATITUDE_PROPERTY
Data property that maps to thelatitude
element. The possible values for this property are instances ofDouble
. -
ALTITUDE_PROPERTY
Data property that maps to thealtitude
element. The possible values for this property are instances ofDouble
. -
LOCATION_SIMPLE_EXTENSION_GROUP_PROPERTY
Data property that maps to theLocationSimpleExtensionGroup
element. The possible values for this property are instances ofList<String>
. -
LOCATION_OBJECT_EXTENSION_GROUP_PROPERTY
Data property that maps to theLocationObjectExtensionGroup
element. The possible values for this property are instances ofList<TLcdKML22AbstractObject>
.
-
-
Constructor Details
-
TLcdKML22Location
public TLcdKML22Location()Creates a newTLcdKML22Location
with its defaultTLcdDataType
. -
TLcdKML22Location
Creates a newTLcdKML22Location
with a customTLcdDataType
.- Parameters:
aType
- a customTLcdDataType
-
-
Method Details
-
setValue
Description copied from interface: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 anIllegalArgumentException
.- Specified by:
setValue
in interfaceILcdDataObject
- Overrides:
setValue
in classTLcdDataObject
- Parameters:
aProperty
- the property for which the value is to be setaValue
- the value to set- See Also:
-
getX
public double getX()Description copied from interface:ILcdPoint
Returns the x coordinate of thisILcdPoint
. -
getY
public double getY()Description copied from interface:ILcdPoint
Returns the y coordinate of thisILcdPoint
. -
getZ
public double getZ()Description copied from interface:ILcdPoint
Returns the z coordinate of thisILcdPoint
. -
getCosY
public double getCosY()Description copied from interface:ILcdPoint
Returns cos(getY()
* DEG2RAD ). -
getCosX
public double getCosX()Description copied from interface:ILcdPoint
Returns cos(getX()
* DEG2RAD ). -
getSinY
public double getSinY()Description copied from interface:ILcdPoint
Returns sin(getY()
* DEG2RAD ). -
getSinX
public double getSinX()Description copied from interface:ILcdPoint
Returns sin(getX()
* DEG2RAD ). -
getTanY
public double getTanY()Description copied from interface:ILcdPoint
Returns tan(getY()
* DEG2RAD ). -
getTanX
public double getTanX()Description copied from interface:ILcdPoint
Returns tan(getX()
* DEG2RAD ). -
move3D
public void move3D(double aLon, double v, double aLat) Description copied from interface:ILcd3DEditableShape
Moves thisILcd3DEditableShape
to the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aLon
- the x coordinate of the point.v
- the y coordinate of the point.aLat
- the z coordinate of the point.
-
cloneAs2DEditablePoint
Description copied from interface:ILcdPoint
Returns a copy of thisILcdPoint
that is also anILcd2DEditablePoint
. This makes sure that the first two dimensions of the copy are writable,- Specified by:
cloneAs2DEditablePoint
in interfaceILcdPoint
- Returns:
- a copy of this
ILcdPoint
that is also anILcd2DEditablePoint
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdPoint
object may be read-only. - See Also:
-
cloneAs3DEditablePoint
Description copied from interface:ILcdPoint
Returns a copy of thisILcdPoint
that is also anILcd3DEditablePoint
. This makes sure that all three dimensions of the copy are writable,- Specified by:
cloneAs3DEditablePoint
in interfaceILcdPoint
- Returns:
- a copy of this
ILcdPoint
that is also anILcd3DEditablePoint
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdPoint
object may be read-only. - See Also:
-
move2D
public void move2D(double aX, double v) Description copied from interface:ILcd2DEditableShape
Moves thisILcd2DEditableShape
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 theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
aX
- the x coordinate of the point.v
- the y coordinate of the point.
-
move3D
Description copied from interface:ILcd3DEditableShape
Moves thisILcd3DEditableShape
to the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3D
in interfaceILcd3DEditableShape
- Parameters:
aPoint
- theILcdPoint
to move to.- See Also:
-
translate3D
public void translate3D(double aDeltaX, double v, double aDeltaY) Description copied from interface:ILcd3DEditableShape
Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.- Specified by:
translate3D
in interfaceILcd3DEditableShape
- Parameters:
aDeltaX
- the x coordinate of the translation vector.v
- the y coordinate of the translation vector.aDeltaY
- the z coordinate of the translation vector.
-
toString
- Overrides:
toString
in classTLcdDataObject
-
move2D
Description copied from interface:ILcd2DEditableShape
Moves thisILcd2DEditableShape
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 theILcdShape
and theILcdPoint
are considered. The third dimension is left unchanged.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
a2DEditablePoint
- theILcdPoint
to move to.- See Also:
-
translate2D
public void translate2D(double aDeltaX, double v) Description copied from interface:ILcd2DEditableShape
Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space. Only the first two dimensions of theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
translate2D
in interfaceILcd2DEditableShape
- Parameters:
aDeltaX
- the x coordinate of the translation vector.v
- the y coordinate of the translation vector.
-
getFocusPoint
Description copied from interface:ILcdShape
Returns the focus point of thisILcdShape
.- Specified by:
getFocusPoint
in interfaceILcdShape
- Returns:
- the focus point of this
ILcdShape
.
-
contains2D
public boolean contains2D(double aX, double v) Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the given point in the 2D space. Only the first two dimensions of theILcdShape
are considered.- Specified by:
contains2D
in interfaceILcdShape
- Parameters:
aX
- the x coordinate of the point.v
- the y coordinate of the point.- Returns:
- the boolean result of the containment test.
-
contains3D
public boolean contains3D(double aX, double v, double aY) Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the given point in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
aX
- the x coordinate of the point.v
- the y coordinate of the point.aY
- the z coordinate of the point.- Returns:
- the boolean result of the containment test.
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
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 ofTLcdLonLatBounds
orTLcdXYBounds
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
equals
Description copied from interface:ILcdPoint
Checks whether thisILcdPoint
is equal to the givenObject
.- Specified by:
equals
in interfaceILcdPoint
- Overrides:
equals
in classObject
- Parameters:
aObject
- theObject
to compare to.- Returns:
- false if aObject is an ILcdPoint object with different 3D coordinates or the object is not an ILcdPoint. If the objects do have the same 3D coordinates, the return value is defined by the specific implementations of ILcdPoint and may still be false.
-
hashCode
public int hashCode() -
contains2D
Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the givenILcdPoint
in the 2D space. Only the first two dimensions of theILcdShape
and theILcdPoint
are considered.- Specified by:
contains2D
in interfaceILcdShape
- Parameters:
aPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains3D
Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
aPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
getLongitude
Returns the value of the property that maps to thelongitude
element.- Returns:
- the value of the
LONGITUDE_PROPERTY
property.
-
setLongitude
Sets the value of the property that maps to thelongitude
element.- Parameters:
aValue
- the value to set for theLONGITUDE_PROPERTY
property.
-
getLatitude
Returns the value of the property that maps to thelatitude
element.- Returns:
- the value of the
LATITUDE_PROPERTY
property.
-
setLatitude
Sets the value of the property that maps to thelatitude
element.- Parameters:
aValue
- the value to set for theLATITUDE_PROPERTY
property.
-
getAltitude
Returns the value of the property that maps to thealtitude
element.- Returns:
- the value of the
ALTITUDE_PROPERTY
property.
-
setAltitude
Sets the value of the property that maps to thealtitude
element.- Parameters:
aValue
- the value to set for theALTITUDE_PROPERTY
property.
-