Enum GeometryType

java.lang.Object
java.lang.Enum<GeometryType>
org.apache.sis.internal.feature.GeometryType
All Implemented Interfaces:
Serializable, Comparable<GeometryType>, java.lang.constant.Constable

public enum GeometryType extends Enum<GeometryType>
Implementation-neutral description of the type of geometry.
Since:
1.1
Version:
1.1
See Also:
  • Enum Constant Details

    • GEOMETRY

      public static final GeometryType GEOMETRY
      Base class of all geometries, with the possible exception of point in some implementation.
      See Also:
    • POINT

      public static final GeometryType POINT
      Zero-dimensional geometry containing a single point. Note that this is not necessarily a subtype of GEOMETRY. The notable exception is Java2D.
      See Also:
    • LINESTRING

      public static final GeometryType LINESTRING
      Sequence of points connected by straight, non-self intersecting line pieces. This is a one-dimensional geometry.
      See Also:
    • POLYGON

      public static final GeometryType POLYGON
      Geometry with a positive area (two-dimensional). The sequence of points form a closed, non-self intersecting ring.
      See Also:
    • MULTI_POINT

      public static final GeometryType MULTI_POINT
      Set of points.
    • MULTI_LINESTRING

      public static final GeometryType MULTI_LINESTRING
      Set of linestrings.
    • MULTI_POLYGON

      public static final GeometryType MULTI_POLYGON
      Set of polygons.
    • GEOMETRY_COLLECTION

      public static final GeometryType GEOMETRY_COLLECTION
      Set of geometries of any type except other geometry collection.
  • Constructor Details

    • GeometryType

      private GeometryType()
  • Method Details

    • values

      public static GeometryType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static GeometryType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • binaryType

      public final int binaryType()
      The type of this geometry as specified in Well-Known Binary (WKB) specification. This is also the integer value declared in the "GEOMETRY_TYPE" column of the "GEOMETRY_COLUMNS table of a spatial database.

      The WKB specification defines values in the [0 … 15] range for 2D geometries and adds 1000 for geometries having Z values. Then 2000 is added again for geometries having M values.

      Returns:
      the geometry type specified in WKB specification.
      See Also:
    • isCollection

      public final boolean isCollection()
      Returns true if this geometry type is some sort of collection. Those types are MULTI_POINT, MULTI_LINESTRING, MULTI_POLYGON or GEOMETRY_COLLECTION.
      Returns:
      whether this geometry type is some kind of collections.
    • forName

      public static GeometryType forName(String name)
      Returns the enumeration value for the given name. This method is case-insensitive.
      Parameters:
      name - the geometry type name, or null.
      Returns:
      enumeration value for the given name, or null if the name was null.
      Throws:
      IllegalArgumentException - if the name is not recognized.
    • forBinaryType

      public static GeometryType forBinaryType(int type)
      Returns the enumeration value for the given WKB type, or null if unknown. Types for geometries having Z and M are replaced by 2D types.
      Parameters:
      type - WKB geometry type.
      Returns:
      enumeration value for the given type, or null if the given type is not recognized.
      See Also: