Interface GeometryType

All Known Subinterfaces:
PointGeometryType
All Known Implementing Classes:
AbstractGeometryType

public interface GeometryType
This class represents the type of a geometry. All the geometries has to have a type that can be retrieved using the Geometry.getGeometryType() method.
Author:
Jorge Piera
  • Method Details

    • getName

      String getName()
      Returns:
      the name of the geometry type.
    • getFullName

      String getFullName()
      Return the full name of this geometry type. It include the type name and the subtype name.
      Returns:
      the full name of the geometry type
    • addAlias

      GeometryType addAlias(String alias)
    • getAlias

      Collection<String> getAlias()
    • getType

      int getType()
      Returns:
      the type of the geometry. It is a constant value that has to be one of the values in Geometry.TYPES The type is an abstract representation of the object (Point, Curve...) but it is not a concrete representation (Point2D, Point3D...).
    • getSubType

      int getSubType()
      Returns:
      the subtype of the geometry. It is a constant value that has to be one of the values in Geometry.SUBTYPES. The subtype represents a set of geometries with a dimensional relationship (2D, 3D, 2DM...)
    • isTypeOf

      boolean isTypeOf(int geometryType)
      Check if a geometry type inherits of other type. E.g: the super type of an arc could be a a curve, the super type of a circle could be a surface...
      Parameters:
      geometryType - the value of the Geometry.TYPES to check if is it super type
      Returns:
      true if the the parameter is a super type of this geometry type
    • isSubTypeOf

      boolean isSubTypeOf(int geometrySubType)
      Check if a geometry subType inherits of other subType. E.g: the super Subtype of a geometry 3D could be a geometry 2D, because the 3D extends the behavior of a geometry 2D.
      Parameters:
      geometrySubType - the value of the Geometry.SUBTYPES to check if is it super subType
      Returns:
      true if the the parameter is a super subType of this geometry type
    • isTypeOf

      boolean isTypeOf(GeometryType geometryType)
      Check if a geometry type inherits of other type. E.g: the super type of an arc could be a a curve, the super type of a circle could be a surface...
      Parameters:
      geometryType - the geometry type to check if is it super type
      Returns:
      if the the parameter is a super type of this geometry type
    • isSubTypeOf

      boolean isSubTypeOf(GeometryType geometryType)
      Check if a geometry subType inherits of other subType. E.g: the super Subtype of a geometry 3D could be a geometry 2D, because the 3D extends the behavior of a geometry 2D.
      Parameters:
      geometryType - the geometry type to check if is it super subtype
      Returns:
      if the the parameter is a super subType of this geometry type
    • create

      This method creates a Geometry with the type specified by this class.The geometry is empty, and all the internal attributes must be assigned to a value when the geometry has been created.
      Returns:
      A empty geometry
      Throws:
      CreateGeometryException
    • setGeometryOperation

      void setGeometryOperation(int index, GeometryOperation geomOp)
      Registers an operation for this geometry type.
      Parameters:
      index -
      geomOp -
    • getGeometryOperation

      GeometryOperation getGeometryOperation(int index)
      Get the operation for this geometry at a concrete position
      Parameters:
      index - The position of the operation
      Returns:
      A geometry operation
    • toString

      String toString()
      Overrides:
      toString in class Object
      Returns:
      the geometry as a String
    • getDimension

      int getDimension()
    • hasZ

      boolean hasZ()
    • hasM

      boolean hasM()
    • getGeometryClass

      Class getGeometryClass()
    • getSuperTypes

      int[] getSuperTypes()