Package com.luciad.format.gml32.model
Class TLcdGML32DirectPosition
java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.format.gml32.model.TLcdGML32DirectPosition
- All Implemented Interfaces:
ILcdDataObject
,com.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs
,ILcdBounded
,ILcdPoint
,ILcdShape
,ILcd2DEditablePoint
,ILcd2DEditableShape
,ILcd3DEditablePoint
,ILcd3DEditableShape
,ILcdCloneable
,ILcdDeepCloneable
,Serializable
,Cloneable
- Direct Known Subclasses:
TLcdGML32Vector
public class TLcdGML32DirectPosition
extends TLcdDataObject
implements com.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs
Direct position instances hold the coordinates for a position within some coordinate reference
system (CRS). Since direct positions, as data types, will often be included in larger objects
(such as geometry elements) that have references to CRS, the srsName attribute will in
general be missing, if this particular direct position is included in a larger element with
such a reference to a CRS. In this case, the CRS is implicitly assumed to take on the value
of the containing object's CRS.
if no srsName attribute is given, the CRS shall be specified as part of the larger context
this geometry element is part of, typically a geometric object like a point, curve, etc.
- Since:
- 10.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TLcdDataProperty
Property that maps on theSRSReferenceGroup
attributes.static final TLcdDataProperty
Property that maps on the value defined by the simple content. -
Constructor Summary
ConstructorDescriptionTLcdGML32DirectPosition
(TLcdDataType aDataType, ILcdModelReference aSrs) Constructs a direct position and initializes its model reference (srs).Constructs a direct position and initializes its model reference (srs). -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a deep clone of this object.Returns a deep clone of this object.Returns a copy of thisILcdPoint
that is also anILcd2DEditablePoint
.Returns a copy of thisILcdPoint
that is also anILcd3DEditablePoint
.boolean
contains2D
(double v, double v1) Checks whether thisILcdShape
contains the given point in the 2D space.boolean
contains2D
(ILcdPoint aILcdPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 2D space.boolean
contains3D
(double v, double v1, double v2) Checks whether thisILcdShape
contains the given point in the 3D space.boolean
contains3D
(ILcdPoint aILcdPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.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
.double
getSinX()
Returns sin(getX()
* DEG2RAD ).double
getSinY()
Returns sin(getY()
* DEG2RAD ).getSrs()
Gets the value of theSRS_PROPERTY
property.double
getTanX()
Returns tan(getX()
* DEG2RAD ).double
getTanY()
Returns tan(getY()
* DEG2RAD ).Returns the value of the value property.double
getX()
Returns the x coordinate of thisILcdPoint
.double
getY()
Returns the y coordinate of thisILcdPoint
.double
getZ()
Returns the z coordinate of thisILcdPoint
.void
move2D
(double x, double y) Moves thisILcd2DEditableShape
to the given point in the 2D space.void
Moves thisILcd2DEditableShape
to the given point in the 2D space.void
move3D
(double x, double y, double z) Moves thisILcd3DEditableShape
to the given point in the 3D space.void
Moves thisILcd3DEditableShape
to the given point in the 3D space.void
setSrs
(ILcdModelReference aValue) Sets the value of theSRS_PROPERTY
property.void
setValue
(TLcdDataProperty aProperty, Object aValue) Sets the value of the given property for this data object.void
setValueObject
(ILcdDoubleList aValue) Sets the value of the value property to the given value.toString()
void
translate2D
(double v, double v1) Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space.void
translate3D
(double v, double v1, double v2) Translates thisILcd3DEditableShape
from its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.datamodel.TLcdDataObject
getDataType, getValue, getValue, hasValue, hasValue, setValue
-
Field Details
-
VALUE_PROPERTY
Property that maps on the value defined by the simple content. Acceptable values for this property are instances ofcom.luciad.util.collections.ILcdDoubleList
. -
SRS_PROPERTY
Property that maps on theSRSReferenceGroup
attributes. Acceptable values for this property are instances ofILcdModelReference
.
-
-
Constructor Details
-
TLcdGML32DirectPosition
-
TLcdGML32DirectPosition
public TLcdGML32DirectPosition() -
TLcdGML32DirectPosition
Constructs a direct position and initializes its model reference (srs).- Parameters:
aSrs
- the model reference for this object- See Also:
-
TLcdGML32DirectPosition
Constructs a direct position and initializes its model reference (srs).- Parameters:
aDataType
- the data type for this objectaSrs
- the model reference for this object- See Also:
-
-
Method Details
-
getValueObject
Returns the value of the value property.- Returns:
- the value of the value property
-
setValueObject
Sets the value of the value property to the given value.- Parameters:
aValue
- the value to set
-
getSrs
Gets the value of theSRS_PROPERTY
property.- Specified by:
getSrs
in interfacecom.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs
- Returns:
- the value of the
SRS_PROPERTY
property.
-
setSrs
Sets the value of theSRS_PROPERTY
property.- Specified by:
setSrs
in interfacecom.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs
- Parameters:
aValue
- the value to set for theSRS_PROPERTY
property.
-
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
. -
getCosX
public double getCosX()Description copied from interface:ILcdPoint
Returns cos(getX()
* DEG2RAD ). -
getCosY
public double getCosY()Description copied from interface:ILcdPoint
Returns cos(getY()
* DEG2RAD ). -
getSinX
public double getSinX()Description copied from interface:ILcdPoint
Returns sin(getX()
* DEG2RAD ). -
getSinY
public double getSinY()Description copied from interface:ILcdPoint
Returns sin(getY()
* DEG2RAD ). -
getTanX
public double getTanX()Description copied from interface:ILcdPoint
Returns tan(getX()
* DEG2RAD ). -
getTanY
public double getTanY()Description copied from interface:ILcdPoint
Returns tan(getY()
* DEG2RAD ). -
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:
-
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:
-
move3D
public void move3D(double x, double y, double z) 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:
x
- the x coordinate of the point.y
- the y coordinate of the point.z
- the z coordinate of the point.
-
translate3D
public void translate3D(double v, double v1, double v2) 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:
v
- the x coordinate of the translation vector.v1
- the y coordinate of the translation vector.v2
- the z coordinate of the translation vector.
-
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:
aILcdPoint
- theILcdPoint
to move to.- See Also:
-
move2D
public void move2D(double x, double y) 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:
x
- the x coordinate of the point.y
- the y coordinate of the point.
-
translate2D
public void translate2D(double v, double v1) 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:
v
- the x coordinate of the translation vector.v1
- 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
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:
aILcdPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains2D
public boolean contains2D(double v, double v1) 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:
v
- the x coordinate of the point.v1
- the y coordinate of the point.- Returns:
- the boolean result of the containment test.
-
contains3D
Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
aILcdPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains3D
public boolean contains3D(double v, double v1, double v2) Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the given point in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
v
- the x coordinate of the point.v1
- the y coordinate of the point.v2
- the z coordinate of the point.- Returns:
- the boolean result of the containment test.
-
clone
Description copied from class:TLcdDataObject
Returns a deep clone of this object. This method delegates toTLcdDataObject.clone(Map)
.- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classTLcdDataObject
- Returns:
- a deep clone of this object
- See Also:
-
clone
Description copied from class:TLcdDataObject
Returns a deep clone of this object. If the clone is not already present in the dictionary, a new instance if created as follows:- First, a new instance is created using Java's clone() mechanism.
- Then, all properties of this object are cloned and set on the newly created
instance. A property is cloned as follows:
- If the property value is an
ILcdDataObject
, the value is cloned by first creating a new instance via thevalue.getDataType().newInstance()
method, and then cloning its properties one by one. - If the value implements
ILcdDeepCloneable
orILcdCloneable
then this interface is used to clone the value. - Otherwise, the property value is copied by reference.
- If the property value is an
- Specified by:
clone
in interfaceILcdDeepCloneable
- Overrides:
clone
in classTLcdDataObject
- Parameters:
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made, and their corresponding clone Object.- Returns:
- a deep clone of this object
-
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.
-
toString
- Overrides:
toString
in classTLcdDataObject
-
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:
-