Class MultiVertexGeometry

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    MultiPath, MultiPoint, MultiVertexGeometryImpl

    public abstract class MultiVertexGeometry
    extends Geometry
    implements java.io.Serializable
    This class is a base for geometries with many vertices. The vertex attributes are stored in separate arrays of corresponding type. There are as many arrays as there are attributes in the vertex.
    See Also:
    Serialized Form
    • Constructor Detail

      • MultiVertexGeometry

        public MultiVertexGeometry()
    • Method Detail

      • getPointCount

        public abstract int getPointCount()
        Returns the total vertex count in this Geometry.
      • getPoint

        public abstract Point getPoint​(int index)
        Returns given vertex of the Geometry.
      • getPoint

        public void getPoint​(int index,
                             Point ptOut)
        Returns given vertex of the Geometry by value.
      • setPoint

        public abstract void setPoint​(int index,
                                      Point pointSrc)
        Sets the vertex at given index of the Geometry.
        Parameters:
        index - The index of the vertex being changed.
        pointSrc - The Point instance to set given vertex attributes from. The pointSrc can not be empty.
        The method throws if the pointSrc is not of the Point type.
        The attributes, that are present in the pointSrc and missing in this Geometry, will be added to the Geometry.
        The vertex attributes missing in the pointSrc but present in the Geometry will be set to the default values (see VertexDescription::GetDefaultValue).
      • getXY

        public abstract Point2D getXY​(int index)
        Returns XY coordinates of the given vertex of the Geometry.
      • getXY

        public abstract void getXY​(int index,
                                   Point2D pt)
      • setXY

        public abstract void setXY​(int index,
                                   Point2D pt)
        Sets XY coordinates of the given vertex of the Geometry. All other attributes are unchanged.
      • getXYZ

        abstract Point3D getXYZ​(int index)
        Returns XYZ coordinates of the given vertex of the Geometry. If the Geometry has no Z's, the default value for Z is returned (0).
      • setXYZ

        abstract void setXYZ​(int index,
                             Point3D pt)
        Sets XYZ coordinates of the given vertex of the Geometry. If Z attribute is not present in this Geometry, it is added. All other attributes are unchanged.
      • getCoordinates2D

        public Point2D[] getCoordinates2D()
        Returns XY coordinates as an array.
      • getCoordinates3D

        Point3D[] getCoordinates3D()
        Returns XYZ coordinates as an array.
      • queryCoordinates

        public abstract void queryCoordinates​(Point[] dst)
      • queryCoordinates

        public abstract void queryCoordinates​(Point2D[] dst)
        Queries XY coordinates as an array. The array must be larg enough (See GetPointCount()).
      • queryCoordinates

        abstract void queryCoordinates​(Point3D[] dst)
        Queries XYZ coordinates as an array. The array must be larg enough (See GetPointCount()).
      • getAttributeAsDbl

        abstract double getAttributeAsDbl​(int semantics,
                                          int index,
                                          int ordinate)
        Returns value of the given vertex attribute as double.
        Parameters:
        semantics - The atribute semantics.
        index - is the vertex index in the Geometry.
        ordinate - is the ordinate of a vertex attribute (for example, y has ordinate of 1, because it is second ordinate of POSITION) If attribute is not present, the default value is returned. See VertexDescription::GetDefaultValue() method.
      • getAttributeAsInt

        abstract int getAttributeAsInt​(int semantics,
                                       int index,
                                       int ordinate)
        Returns value of the given vertex attribute as int.
        Parameters:
        semantics - The atribute semantics.
        index - is the vertex index in the Geometry.
        ordinate - is the ordinate of a vertex attribute (for example, y has ordinate of 1, because it is second ordinate of POSITION) If attribute is not present, the default value is returned. See VertexDescription::GetDefaultValue() method. Avoid using this method on non-integer atributes.
      • setAttribute

        abstract void setAttribute​(int semantics,
                                   int index,
                                   int ordinate,
                                   double value)
        Sets the value of given attribute at given posisiotnsis.
        Parameters:
        semantics - The atribute semantics.
        index - is the vertex index in the Geometry.
        ordinate - is the ordinate of a vertex attribute (for example, y has ordinate of 1, because it is seond ordinate of POSITION)
        value - is the value to set. as well as the number of components of the attribute. If the attribute is not present in this Geometry, it is added.
      • setAttribute

        abstract void setAttribute​(int semantics,
                                   int index,
                                   int ordinate,
                                   int value)
        Same as above, but works with ints. Avoid using this method on non-integer atributes because some double attributes may have NaN default values (e.g. Ms)
      • getPointByVal

        public abstract void getPointByVal​(int index,
                                           Point outPoint)
        Returns given vertex of the Geometry. The outPoint will have same VertexDescription as this Geometry.
      • setPointByVal

        public abstract void setPointByVal​(int index,
                                           Point pointSrc)
        Sets the vertex at given index of the Geometry.
        Parameters:
        index - The index of the vertex being changed.
        pointSrc - The Point instance to set given vertex attributes from. The pointSrc can not be empty.
        The method throws if the pointSrc is not of the Point type.
        The attributes, that are present in the pointSrc and missing in this Geometry, will be added to the Geometry.
        The vertex attributes missing in the pointSrc but present in the Geometry will be set to the default values (see VertexDescription::GetDefaultValue).