Class TLcdGML31Coordinates

All Implemented Interfaces:
ILcdDataObject, ILcdPointList, ILcd2DEditablePointList, ILcd3DEditablePointList, ILcdCloneable, ILcdDeepCloneable, ILcdFeatured, ILcdSelfDescribedFeatured, Serializable, Cloneable

public class TLcdGML31Coordinates extends TLcdFeaturedDataObject implements ILcd3DEditablePointList
This type is deprecated for tuples with ordinate values that are numbers. CoordinatesType is a text string, intended to be used to record an array of tuples or coordinates. While it is not possible to enforce the internal structure of the string through schema validation, some optional attributes have been provided in previous versions of GML to support a description of the internal structure. These attributes are deprecated. The attributes were intended to be used as follows:
  • Decimal: symbol used for a decimal point (default="." a stop or period)
  • cs: symbol used to separate components within a tuple or coordinate string (default="," a comma)
  • ts: symbol used to separate tuples or coordinate strings (default=" " a space)
Since it is based on the XML Schema string type, CoordinatesType may be used in the construction of tables of tuples or arrays of tuples, including ones that contain mixed text and numeric values.

Note that the implementation of the ILcd3DEditablePointList interface in this class has been made deprecated. This is because a coordinates object does not have enough information to correctly implement it. In particular, the coordinates object does not know if the coordinate values should be interpreted as lon-lat or lat-lon coordinates. In a larger context, this is not an issue because coordinates are always encapsulated by other geometries (such as for instance a line string) that do know how to interpret the coordinate values.

Since:
10.0
See Also:
  • Field Details

    • VALUE_PROPERTY

      public static final TLcdDataProperty VALUE_PROPERTY
      Data property that maps to the value defined by the simple content. The possible values for this property are instances of String.
    • CS_PROPERTY

      public static final TLcdDataProperty CS_PROPERTY
      Data property that maps to the cs attribute. The possible values for this property are instances of String.
    • DECIMAL_PROPERTY

      public static final TLcdDataProperty DECIMAL_PROPERTY
      Data property that maps to the decimal attribute. The possible values for this property are instances of String.
    • TS_PROPERTY

      public static final TLcdDataProperty TS_PROPERTY
      Data property that maps to the ts attribute. The possible values for this property are instances of String.
  • Constructor Details

    • TLcdGML31Coordinates

      public TLcdGML31Coordinates()
    • TLcdGML31Coordinates

      public TLcdGML31Coordinates(TLcdDataType aType)
  • Method Details

    • getValue

      public String getValue()
    • setValue

      public void setValue(String aValue)
    • translate3D

      @Deprecated public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
      Deprecated.
      Description copied from interface: ILcd3DEditablePointList
      Translates all the points of this ILcd3DEditablePointList from their current positions over the given translation vector in the 3D space.
      Specified by:
      translate3D in interface ILcd3DEditablePointList
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
      aDeltaZ - the z coordinate of the translation vector.
    • move3DPoint

      @Deprecated public void move3DPoint(int aIndex, double aX, double aY, double aZ)
      Deprecated.
      Description copied from interface: ILcd3DEditablePointList
      Moves the specified point of this ILcd3DEditablePointList to the given point in the 3D space.
      Specified by:
      move3DPoint in interface ILcd3DEditablePointList
      Parameters:
      aIndex - a valid index in the list of points.
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
    • translate3DPoint

      @Deprecated public void translate3DPoint(int aIndex, double aDeltaX, double aDeltaY, double aDeltaZ)
      Deprecated.
      Description copied from interface: ILcd3DEditablePointList
      Translates the specified point of this ILcd3DEditablePointList from its current position over the given translation vector in the 3D space.
      Specified by:
      translate3DPoint in interface ILcd3DEditablePointList
      Parameters:
      aIndex - a valid new index in the list of points.
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
      aDeltaZ - the z coordinate of the translation vector.
    • insert3DPoint

      @Deprecated public void insert3DPoint(int aIndex, double aX, double aY, double aZ)
      Deprecated.
      Description copied from interface: ILcd3DEditablePointList
      Inserts a point at the given index into this ILcd3DEditablePointList.
      Specified by:
      insert3DPoint in interface ILcd3DEditablePointList
      Parameters:
      aIndex - a valid new index in the list of points.
      aX - the x coordinate of the new point.
      aY - the y coordinate of the new point.
      aZ - the z coordinate of the new point.
    • removePointAt

      public void removePointAt(int aIndex)
      Description copied from interface: ILcd3DEditablePointList
      Removes the point at the given index from this ILcd3DEditablePointList.
      Specified by:
      removePointAt in interface ILcd2DEditablePointList
      Specified by:
      removePointAt in interface ILcd3DEditablePointList
      Parameters:
      aIndex - a valid index in the list of ILcdPoint objects.
    • translate2D

      @Deprecated public void translate2D(double aDeltaX, double aDeltaY)
      Deprecated.
      Description copied from interface: ILcd2DEditablePointList
      Translates all the points of this ILcd2DEditablePointList from their current positions over the given translation vector in the 2D space. Only the first two dimensions of the points are considered. The third dimension is left unchanged.
      Specified by:
      translate2D in interface ILcd2DEditablePointList
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
    • move2DPoint

      @Deprecated public void move2DPoint(int aIndex, double aX, double aY)
      Deprecated.
      Description copied from interface: ILcd2DEditablePointList
      Moves the specified point of this ILcd2DEditablePointList to the given point in the 2D space. Only the first two dimensions of the ILcdShape are considered. The third dimension is left unchanged.
      Specified by:
      move2DPoint in interface ILcd2DEditablePointList
      Parameters:
      aIndex - a valid index in the list of points.
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
    • translate2DPoint

      @Deprecated public void translate2DPoint(int aIndex, double aDeltaX, double aDeltaY)
      Deprecated.
      Description copied from interface: ILcd2DEditablePointList
      Translates the specified point of this ILcd2DEditablePointList from its current position over the given translation vector in the 2D space. Only the first two dimensions of the points are considered. The third dimension is left unchanged.
      Specified by:
      translate2DPoint in interface ILcd2DEditablePointList
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
    • insert2DPoint

      @Deprecated public void insert2DPoint(int aIndex, double aX, double aY)
      Deprecated.
      Description copied from interface: ILcd2DEditablePointList
      Inserts a point at the given index into this ILcd2DEditablePointList.
      Specified by:
      insert2DPoint in interface ILcd2DEditablePointList
      Parameters:
      aIndex - a valid new index in the list of points.
      aX - the x coordinate of the new point.
      aY - the y coordinate of the new point.
    • getPointCount

      public int getPointCount()
      Description copied from interface: ILcdPointList
      Returns the number of ILcdPoint objects in the list.
      Specified by:
      getPointCount in interface ILcdPointList
      Returns:
      the number of ILcdPoint objects in the list.
    • getPoint

      @Deprecated public ILcdPoint getPoint(int aIndex) throws IndexOutOfBoundsException
      Deprecated.
      Description copied from interface: ILcdPointList
      Returns the ILcdPoint at a given index.
      Specified by:
      getPoint in interface ILcdPointList
      Parameters:
      aIndex - a valid index in the list of ILcdPoint objects.
      Returns:
      the ILcdPoint at the given index.
      Throws:
      IndexOutOfBoundsException - if the given index is out of bounds.
    • getValue

      public Object getValue(TLcdDataProperty aProperty)
      Description copied from interface: ILcdDataObject

      Returns the value of the given property.

      If the property is a collection, the returned value will never be null. If the property has not been set, an empty collection of the appropriate type will be returned (Set, List or Map).

      The property must not be null, and must be declared in the data object's type or in one of its super types. Otherwise an IllegalArgumentException is thrown.

      Specified by:
      getValue in interface ILcdDataObject
      Overrides:
      getValue in class TLcdDataObject
      Parameters:
      aProperty - the property for which the value is to be returned
      Returns:
      the value of the given property for this data object
    • hasValue

      public boolean hasValue(TLcdDataProperty aProperty)
      Description copied from interface: ILcdDataObject
      Indicates whether this data object has a value for the given property.

      • aProperty is from the right data type, and this instance has a value for it: returns true
      • aProperty is from the right data type, and this instance has no value for it: returns false
      • aProperty is not from the right data type: not allowed, you will get IllegalArgumentException
      • aProperty is null: not allowed, you will get NullPointerException

      A multivalued property is considered to have a value if it has at least one value.

      Specified by:
      hasValue in interface ILcdDataObject
      Overrides:
      hasValue in class TLcdDataObject
      Parameters:
      aProperty - the property for which to return whether a value is present or not.
      Returns:
      true if this data object has a value for the given property, false otherwise.
    • setValue

      public void setValue(TLcdDataProperty aProperty, Object aValue)
      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
      aValue - the value to set
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class TLcdDataObject
    • clone

      public TLcdGML31Coordinates 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
    • getValues

      public double[] getValues()
      Returns the coordinate values. This array is computed from the value of the ALcdGML31Coordinates.VALUE_PROPERTY.
      Returns:
      the coordinate values of this object
      See Also:
    • getValueObject

      public String getValueObject()
      Returns the value of the property that maps to the value defined by the simple content.
      Returns:
      the value of the VALUE_PROPERTY property.
    • setValueObject

      public void setValueObject(String aValue)
      Sets the value of the property that maps to the value defined by the simple content.
      Parameters:
      aValue - the value to set for the VALUE_PROPERTY property.
    • getCs

      public String getCs()
      Returns the value of the property that maps to the cs attribute.
      Returns:
      the value of the CS_PROPERTY property.
    • setCs

      public void setCs(String aValue)
      Sets the value of the property that maps to the cs attribute.
      Parameters:
      aValue - the value to set for the CS_PROPERTY property.
    • getDecimal

      public String getDecimal()
      Returns the value of the property that maps to the decimal attribute.
      Returns:
      the value of the DECIMAL_PROPERTY property.
    • setDecimal

      public void setDecimal(String aValue)
      Sets the value of the property that maps to the decimal attribute.
      Parameters:
      aValue - the value to set for the DECIMAL_PROPERTY property.
    • getTs

      public String getTs()
      Returns the value of the property that maps to the ts attribute.
      Returns:
      the value of the TS_PROPERTY property.
    • setTs

      public void setTs(String aValue)
      Sets the value of the property that maps to the ts attribute.
      Parameters:
      aValue - the value to set for the TS_PROPERTY property.