Package org.apache.sis.internal.feature
Enum GeometryType
- All Implemented Interfaces:
Serializable
,Comparable<GeometryType>
,java.lang.constant.Constable
Implementation-neutral description of the type of geometry.
- Since:
- 1.1
- Version:
- 1.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBase class of all geometries, with the possible exception of point in some implementation.Set of geometries of any type except other geometry collection.Sequence of points connected by straight, non-self intersecting line pieces.Set of linestrings.Set of points.Set of polygons.Zero-dimensional geometry containing a single point.Geometry with a positive area (two-dimensional). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal int
The type of this geometry as specified in Well-Known Binary (WKB) specification.static GeometryType
forBinaryType
(int type) Returns the enumeration value for the given WKB type, ornull
if unknown.static GeometryType
Returns the enumeration value for the given name.final boolean
Returnstrue
if this geometry type is some sort of collection.static GeometryType
Returns the enum constant of this type with the specified name.static GeometryType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
GEOMETRY
Base class of all geometries, with the possible exception of point in some implementation.- See Also:
-
POINT
Zero-dimensional geometry containing a single point. Note that this is not necessarily a subtype ofGEOMETRY
. The notable exception is Java2D.- See Also:
-
LINESTRING
Sequence of points connected by straight, non-self intersecting line pieces. This is a one-dimensional geometry.- See Also:
-
POLYGON
Geometry with a positive area (two-dimensional). The sequence of points form a closed, non-self intersecting ring.- See Also:
-
MULTI_POINT
Set of points. -
MULTI_LINESTRING
Set of linestrings. -
MULTI_POLYGON
Set of polygons. -
GEOMETRY_COLLECTION
Set of geometries of any type except other geometry collection.
-
-
Constructor Details
-
GeometryType
private GeometryType()
-
-
Method Details
-
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
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 nameNullPointerException
- 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()Returnstrue
if this geometry type is some sort of collection. Those types areMULTI_POINT
,MULTI_LINESTRING
,MULTI_POLYGON
orGEOMETRY_COLLECTION
.- Returns:
- whether this geometry type is some kind of collections.
-
forName
Returns the enumeration value for the given name. This method is case-insensitive.- Parameters:
name
- the geometry type name, ornull
.- Returns:
- enumeration value for the given name, or
null
if the name was null. - Throws:
IllegalArgumentException
- if the name is not recognized.
-
forBinaryType
Returns the enumeration value for the given WKB type, ornull
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:
-