Class TLcdGML31Vector
- All Implemented Interfaces:
ILcdDataObject,com.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs,ILcdBounded,ILcdPoint,ILcdShape,ILcd2DEditablePoint,ILcd2DEditableShape,ILcd3DEditablePoint,ILcd3DEditableShape,ILcdCloneable,ILcdDeepCloneable,ILcdFeatured,ILcdSelfDescribedFeatured,Serializable,Cloneable
Vector instances hold the components for a (usually spatial) vector within some coordinate reference system (CRS).
Since Vectors will often be included in larger objects that have references to CRS, the "srsName" attribute may be missing.
In this case, the CRS is implicitly assumed to take on the value of the containing object's CRS.
Note that this content model is the same as DirectPositionType, but is defined separately to reflect the distinct semantics, and to avoid validation problems. SJDC 2004-12-02
- Since:
- 10.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TLcdDataPropertyProperty that maps on theSRSReferenceGroupattributes.static final TLcdDataPropertyProperty that maps on the value defined by the simple content. -
Constructor Summary
ConstructorsConstructorDescriptionTLcdGML31Vector(TLcdDataType aType) TLcdGML31Vector(TLcdDataType aDataType, ILcdModelReference aModelReference) Constructs a new vector and initializes its srs with the given model reference.TLcdGML31Vector(ILcdModelReference aModelReference) Constructs a new vector and initializes its srs with the given model reference. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a deep clone of this object.Returns a deep clone of this object.Returns a copy of thisILcdPointthat is also anILcd2DEditablePoint.Returns a copy of thisILcdPointthat is also anILcd3DEditablePoint.booleancontains2D(double v, double v1) Checks whether thisILcdShapecontains the given point in the 2D space.booleancontains2D(ILcdPoint aILcdPoint) Checks whether thisILcdShapecontains the givenILcdPointin the 2D space.booleancontains3D(double v, double v1, double v2) Checks whether thisILcdShapecontains the given point in the 3D space.booleancontains3D(ILcdPoint aILcdPoint) Checks whether thisILcdShapecontains the givenILcdPointin the 3D space.Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.doublegetCosX()Returns cos(getX()* DEG2RAD ).doublegetCosY()Returns cos(getY()* DEG2RAD ).Returns the focus point of thisILcdShape.doublegetSinX()Returns sin(getX()* DEG2RAD ).doublegetSinY()Returns sin(getY()* DEG2RAD ).getSrs()Gets the value of theSRS_PROPERTYproperty.doublegetTanX()Returns tan(getX()* DEG2RAD ).doublegetTanY()Returns tan(getY()* DEG2RAD ).Returns the value of the value property.doublegetX()Returns the x coordinate of thisILcdPoint.doublegetY()Returns the y coordinate of thisILcdPoint.doublegetZ()Returns the z coordinate of thisILcdPoint.voidmove2D(double x, double y) Moves thisILcd2DEditableShapeto the given point in the 2D space.voidMoves thisILcd2DEditableShapeto the given point in the 2D space.voidmove3D(double x, double y, double z) Moves thisILcd3DEditableShapeto the given point in the 3D space.voidMoves thisILcd3DEditableShapeto the given point in the 3D space.voidsetSrs(ILcdModelReference aValue) Sets the value of theSRS_PROPERTYproperty.voidsetValue(TLcdDataProperty aProperty, Object aFeature) Sets the value of the given property for this data object.voidsetValueObject(ILcdDoubleList aValue) Sets the value of the value property to the given value.voidtranslate2D(double v, double v1) Translates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space.voidtranslate3D(double v, double v1, double v2) Translates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.Methods inherited from class com.luciad.datamodel.TLcdFeaturedDataObject
canSetFeature, getFeature, getFeature, getFeatureCount, getFeaturedDescriptor, setFeature, setFeatureMethods inherited from class com.luciad.datamodel.TLcdDataObject
getDataType, getValue, getValue, hasValue, hasValue, setValue, toString
-
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 theSRSReferenceGroupattributes. Acceptable values for this property are instances ofILcdModelReference.
-
-
Constructor Details
-
TLcdGML31Vector
public TLcdGML31Vector() -
TLcdGML31Vector
Constructs a new vector and initializes its srs with the given model reference.- Parameters:
aModelReference- the srs to use for the new vector
-
TLcdGML31Vector
Constructs a new vector and initializes its srs with the given model reference.- Parameters:
aDataType- the data type for this objectaModelReference- the srs to use for the new vector
-
TLcdGML31Vector
-
-
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_PROPERTYproperty.- Specified by:
getSrsin interfacecom.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs- Returns:
- the value of the
SRS_PROPERTYproperty.
-
setSrs
Sets the value of theSRS_PROPERTYproperty.- Specified by:
setSrsin interfacecom.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs- Parameters:
aValue- the value to set for theSRS_PROPERTYproperty.
-
getX
public double getX()Description copied from interface:ILcdPointReturns the x coordinate of thisILcdPoint. -
getY
public double getY()Description copied from interface:ILcdPointReturns the y coordinate of thisILcdPoint. -
getZ
public double getZ()Description copied from interface:ILcdPointReturns the z coordinate of thisILcdPoint. -
getCosX
public double getCosX()Description copied from interface:ILcdPointReturns cos(getX()* DEG2RAD ). -
getCosY
public double getCosY()Description copied from interface:ILcdPointReturns cos(getY()* DEG2RAD ). -
getSinX
public double getSinX()Description copied from interface:ILcdPointReturns sin(getX()* DEG2RAD ). -
getSinY
public double getSinY()Description copied from interface:ILcdPointReturns sin(getY()* DEG2RAD ). -
getTanX
public double getTanX()Description copied from interface:ILcdPointReturns tan(getX()* DEG2RAD ). -
getTanY
public double getTanY()Description copied from interface:ILcdPointReturns tan(getY()* DEG2RAD ). -
cloneAs2DEditablePoint
Description copied from interface:ILcdPointReturns a copy of thisILcdPointthat is also anILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable,- Specified by:
cloneAs2DEditablePointin interfaceILcdPoint- Returns:
- a copy of this
ILcdPointthat is also anILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdPointobject may be read-only. - See Also:
-
cloneAs3DEditablePoint
Description copied from interface:ILcdPointReturns a copy of thisILcdPointthat is also anILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable,- Specified by:
cloneAs3DEditablePointin interfaceILcdPoint- Returns:
- a copy of this
ILcdPointthat is also anILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable, even if the originalILcdPointobject may be read-only. - See Also:
-
move3D
Description copied from interface:ILcd3DEditableShapeMoves thisILcd3DEditableShapeto the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3Din interfaceILcd3DEditableShape- Parameters:
aPoint- theILcdPointto move to.- See Also:
-
move3D
public void move3D(double x, double y, double z) Description copied from interface:ILcd3DEditableShapeMoves thisILcd3DEditableShapeto the given point in the 3D space. The focus point is used as the handle by which the shape is moved.- Specified by:
move3Din 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:ILcd3DEditableShapeTranslates thisILcd3DEditableShapefrom its current position over the given translation vector in the 3D space.- Specified by:
translate3Din 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:ILcd2DEditableShapeMoves thisILcd2DEditableShapeto 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 theILcdShapeand theILcdPointare considered. The third dimension is left unchanged.- Specified by:
move2Din interfaceILcd2DEditableShape- Parameters:
aILcdPoint- theILcdPointto move to.- See Also:
-
move2D
public void move2D(double x, double y) Description copied from interface:ILcd2DEditableShapeMoves thisILcd2DEditableShapeto 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 theILcdShapeare considered. The third dimension is left unchanged.- Specified by:
move2Din 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:ILcd2DEditableShapeTranslates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space. Only the first two dimensions of theILcdShapeare considered. The third dimension is left unchanged.- Specified by:
translate2Din interfaceILcd2DEditableShape- Parameters:
v- the x coordinate of the translation vector.v1- the y coordinate of the translation vector.
-
getFocusPoint
Description copied from interface:ILcdShapeReturns the focus point of thisILcdShape.- Specified by:
getFocusPointin interfaceILcdShape- Returns:
- the focus point of this
ILcdShape.
-
contains2D
Description copied from interface:ILcdShapeChecks whether thisILcdShapecontains the givenILcdPointin the 2D space. Only the first two dimensions of theILcdShapeand theILcdPointare considered.- Specified by:
contains2Din interfaceILcdShape- Parameters:
aILcdPoint- theILcdPointto test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains2D
public boolean contains2D(double v, double v1) Description copied from interface:ILcdShapeChecks whether thisILcdShapecontains the given point in the 2D space. Only the first two dimensions of theILcdShapeare considered.- Specified by:
contains2Din 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:ILcdShapeChecks whether thisILcdShapecontains the givenILcdPointin the 3D space.- Specified by:
contains3Din interfaceILcdShape- Parameters:
aILcdPoint- theILcdPointto 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:ILcdShapeChecks whether thisILcdShapecontains the given point in the 3D space.- Specified by:
contains3Din 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:TLcdDataObjectReturns a deep clone of this object. This method delegates toTLcdDataObject.clone(Map).- Specified by:
clonein interfaceILcdCloneable- Overrides:
clonein classTLcdDataObject- Returns:
- a deep clone of this object
- See Also:
-
clone
Description copied from class:TLcdDataObjectReturns 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
ILcdDeepCloneableorILcdCloneablethen this interface is used to clone the value. - Otherwise, the property value is copied by reference.
- If the property value is an
- Specified by:
clonein interfaceILcdDeepCloneable- Overrides:
clonein 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:ILcdBoundedReturns theILcdBoundsby which the geometry of thisILcdBoundedobject 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
undefinedbounds. You can create undefined bounds using the default constructors ofTLcdLonLatBoundsorTLcdXYBounds.- Specified by:
getBoundsin interfaceILcdBounded- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.
-
setValue
Description copied from interface:ILcdDataObjectSets 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 typeor 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:
setValuein interfaceILcdDataObject- Overrides:
setValuein classTLcdDataObject- Parameters:
aProperty- the property for which the value is to be setaFeature- the value to set- See Also:
-