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

public class TLcdGML31Vector extends TLcdFeaturedDataObject implements com.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs

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 Details

    • VALUE_PROPERTY

      public static final TLcdDataProperty VALUE_PROPERTY
      Property that maps on the value defined by the simple content. Acceptable values for this property are instances of com.luciad.util.collections.ILcdDoubleList.
    • SRS_PROPERTY

      public static final TLcdDataProperty SRS_PROPERTY
      Property that maps on the SRSReferenceGroup attributes. Acceptable values for this property are instances of ILcdModelReference.
  • Constructor Details

    • TLcdGML31Vector

      public TLcdGML31Vector()
    • TLcdGML31Vector

      public TLcdGML31Vector(ILcdModelReference aModelReference)
      Constructs a new vector and initializes its srs with the given model reference.
      Parameters:
      aModelReference - the srs to use for the new vector
    • TLcdGML31Vector

      public TLcdGML31Vector(TLcdDataType aDataType, ILcdModelReference aModelReference)
      Constructs a new vector and initializes its srs with the given model reference.
      Parameters:
      aDataType - the data type for this object
      aModelReference - the srs to use for the new vector
    • TLcdGML31Vector

      public TLcdGML31Vector(TLcdDataType aType)
  • Method Details

    • getValueObject

      public ILcdDoubleList getValueObject()
      Returns the value of the value property.
      Returns:
      the value of the value property
    • setValueObject

      public void setValueObject(ILcdDoubleList aValue)
      Sets the value of the value property to the given value.
      Parameters:
      aValue - the value to set
    • getSrs

      public ILcdModelReference getSrs()
      Gets the value of the SRS_PROPERTY property.
      Specified by:
      getSrs in interface com.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs
      Returns:
      the value of the SRS_PROPERTY property.
    • setSrs

      public void setSrs(ILcdModelReference aValue)
      Sets the value of the SRS_PROPERTY property.
      Specified by:
      setSrs in interface com.luciad.internal.format.gmlcommon.ILcd3DEditablePointWithSrs
      Parameters:
      aValue - the value to set for the SRS_PROPERTY property.
    • getX

      public double getX()
      Description copied from interface: ILcdPoint
      Returns the x coordinate of this ILcdPoint.
      Specified by:
      getX in interface ILcdPoint
      Returns:
      the x coordinate of this ILcdPoint.
    • getY

      public double getY()
      Description copied from interface: ILcdPoint
      Returns the y coordinate of this ILcdPoint.
      Specified by:
      getY in interface ILcdPoint
      Returns:
      the y coordinate of this ILcdPoint.
    • getZ

      public double getZ()
      Description copied from interface: ILcdPoint
      Returns the z coordinate of this ILcdPoint.
      Specified by:
      getZ in interface ILcdPoint
      Returns:
      the z coordinate of this ILcdPoint.
    • getCosX

      public double getCosX()
      Description copied from interface: ILcdPoint
      Returns cos( getX() * DEG2RAD ).
      Specified by:
      getCosX in interface ILcdPoint
      Returns:
      cos( getX() * DEG2RAD ).
    • getCosY

      public double getCosY()
      Description copied from interface: ILcdPoint
      Returns cos( getY() * DEG2RAD ).
      Specified by:
      getCosY in interface ILcdPoint
      Returns:
      cos( getY() * DEG2RAD ).
    • getSinX

      public double getSinX()
      Description copied from interface: ILcdPoint
      Returns sin( getX() * DEG2RAD ).
      Specified by:
      getSinX in interface ILcdPoint
      Returns:
      sin( getX() * DEG2RAD ).
    • getSinY

      public double getSinY()
      Description copied from interface: ILcdPoint
      Returns sin( getY() * DEG2RAD ).
      Specified by:
      getSinY in interface ILcdPoint
      Returns:
      sin( getY() * DEG2RAD ).
    • getTanX

      public double getTanX()
      Description copied from interface: ILcdPoint
      Returns tan( getX() * DEG2RAD ).
      Specified by:
      getTanX in interface ILcdPoint
      Returns:
      tan( getX() * DEG2RAD ).
    • getTanY

      public double getTanY()
      Description copied from interface: ILcdPoint
      Returns tan( getY() * DEG2RAD ).
      Specified by:
      getTanY in interface ILcdPoint
      Returns:
      tan( getY() * DEG2RAD ).
    • cloneAs2DEditablePoint

      public ILcd2DEditablePoint cloneAs2DEditablePoint()
      Description copied from interface: ILcdPoint
      Returns a copy of this ILcdPoint that is also an ILcd2DEditablePoint. This makes sure that the first two dimensions of the copy are writable,
      Specified by:
      cloneAs2DEditablePoint in interface ILcdPoint
      Returns:
      a copy of this 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.
      See Also:
    • cloneAs3DEditablePoint

      public ILcd3DEditablePoint cloneAs3DEditablePoint()
      Description copied from interface: ILcdPoint
      Returns a copy of this ILcdPoint that is also an ILcd3DEditablePoint. This makes sure that all three dimensions of the copy are writable,
      Specified by:
      cloneAs3DEditablePoint in interface ILcdPoint
      Returns:
      a copy of this 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.
      See Also:
    • move3D

      public void move3D(ILcdPoint aPoint)
      Description copied from interface: ILcd3DEditableShape
      Moves this ILcd3DEditableShape 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 interface ILcd3DEditableShape
      Parameters:
      aPoint - the ILcdPoint to move to.
      See Also:
    • move3D

      public void move3D(double x, double y, double z)
      Description copied from interface: ILcd3DEditableShape
      Moves this ILcd3DEditableShape 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 interface ILcd3DEditableShape
      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 this ILcd3DEditableShape from its current position over the given translation vector in the 3D space.
      Specified by:
      translate3D in interface ILcd3DEditableShape
      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

      public void move2D(ILcdPoint aILcdPoint)
      Description copied from interface: ILcd2DEditableShape
      Moves this 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.
      Specified by:
      move2D in interface ILcd2DEditableShape
      Parameters:
      aILcdPoint - the ILcdPoint to move to.
      See Also:
    • move2D

      public void move2D(double x, double y)
      Description copied from interface: ILcd2DEditableShape
      Moves this 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.
      Specified by:
      move2D in interface ILcd2DEditableShape
      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 this 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.
      Specified by:
      translate2D in interface ILcd2DEditableShape
      Parameters:
      v - the x coordinate of the translation vector.
      v1 - the y coordinate of the translation vector.
    • getFocusPoint

      public ILcdPoint getFocusPoint()
      Description copied from interface: ILcdShape
      Returns the focus point of this ILcdShape.
      Specified by:
      getFocusPoint in interface ILcdShape
      Returns:
      the focus point of this ILcdShape.
    • contains2D

      public boolean contains2D(ILcdPoint aILcdPoint)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given ILcdPoint in the 2D space. Only the first two dimensions of the ILcdShape and the ILcdPoint are considered.
      Specified by:
      contains2D in interface ILcdShape
      Parameters:
      aILcdPoint - the ILcdPoint 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 this ILcdShape contains the given point in the 2D space. Only the first two dimensions of the ILcdShape are considered.
      Specified by:
      contains2D in interface ILcdShape
      Parameters:
      v - the x coordinate of the point.
      v1 - the y coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • contains3D

      public boolean contains3D(ILcdPoint aILcdPoint)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given ILcdPoint in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      Parameters:
      aILcdPoint - the ILcdPoint 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 this ILcdShape contains the given point in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      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

      public TLcdGML31Vector clone()
      Description copied from class: TLcdDataObject
      Returns a deep clone of this object. This method delegates to TLcdDataObject.clone(Map).
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class TLcdDataObject
      Returns:
      a deep clone of this object
      See Also:
    • clone

      public TLcdDataObject clone(Map aObjectDictionary)
      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 the value.getDataType().newInstance() method, and then cloning its properties one by one.
        • If the value implements ILcdDeepCloneable or ILcdCloneable then this interface is used to clone the value.
        • Otherwise, the property value is copied by reference.
      Specified by:
      clone in interface ILcdDeepCloneable
      Overrides:
      clone in class TLcdDataObject
      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

      public ILcdBounds getBounds()
      Description copied from interface: ILcdBounded
      Returns the 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.

      Specified by:
      getBounds in interface ILcdBounded
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aFeature)
      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 the data 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.

      Specified by:
      setValue in interface ILcdDataObject
      Overrides:
      setValue in class TLcdDataObject
      Parameters:
      aProperty - the property for which the value is to be set
      aFeature - the value to set
      See Also: