Enum EGeometryType
- java.lang.Object
-
- java.lang.Enum<EGeometryType>
-
- org.hortonmachine.gears.utils.geometry.EGeometryType
-
- All Implemented Interfaces:
Serializable,Comparable<EGeometryType>
public enum EGeometryType extends Enum<EGeometryType>
Geometry types used by the utility.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description GEOMETRYCOLLECTIONLINESTRINGMULTILINESTRINGMULTIPOINTMULTIPOLYGONPOINTPOLYGONUNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EGeometryTypeforClass(Class<?> clazz)static EGeometryTypeforGeometry(org.locationtech.jts.geom.Geometry geometry)Returns theEGeometryTypefor a givenGeometry.static EGeometryTypeforGeometryDescriptor(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)Returns theEGeometryTypefor a givenGeometryDescriptor.static EGeometryTypeforGeometryType(org.opengis.feature.type.GeometryType geometryType)Returns theEGeometryTypefor a givenGeometryType.static EGeometryTypeforWktName(String wktName)Class<?>getClazz()Class<?>getMultiClazz()booleanisCompatibleWith(EGeometryType geometryType)static booleanisLine(org.locationtech.jts.geom.Geometry geometry)Checks if the given geometry is aLineString(orMultiLineString) geometry.static booleanisLine(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)Checks if the givenGeometryDescriptoris forLineString(orMultiLineString) geometry.booleanisMulti()static booleanisPoint(org.locationtech.jts.geom.Geometry geometry)Checks if the given geometry is aPoint(orMultiPoint) geometry.static booleanisPoint(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)Checks if the givenGeometryDescriptoris forPoint(orMultiPoint) geometry.static booleanisPolygon(org.locationtech.jts.geom.Geometry geometry)Checks if the given geometry is aPolygon(orMultiPolygon) geometry.static booleanisPolygon(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)Checks if the givenGeometryDescriptoris forPolygon(orMultiPolygon) geometry.ESpatialiteGeometryTypetoSpatialiteGeometryType()static EGeometryTypevalueOf(String name)Returns the enum constant of this type with the specified name.static EGeometryType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POINT
public static final EGeometryType POINT
-
MULTIPOINT
public static final EGeometryType MULTIPOINT
-
LINESTRING
public static final EGeometryType LINESTRING
-
MULTILINESTRING
public static final EGeometryType MULTILINESTRING
-
POLYGON
public static final EGeometryType POLYGON
-
MULTIPOLYGON
public static final EGeometryType MULTIPOLYGON
-
GEOMETRYCOLLECTION
public static final EGeometryType GEOMETRYCOLLECTION
-
UNKNOWN
public static final EGeometryType UNKNOWN
-
-
Method Detail
-
values
public static EGeometryType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EGeometryType c : EGeometryType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EGeometryType 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 nameNullPointerException- if the argument is null
-
getClazz
public Class<?> getClazz()
-
getMultiClazz
public Class<?> getMultiClazz()
-
forClass
public static EGeometryType forClass(Class<?> clazz)
-
isMulti
public boolean isMulti()
-
isCompatibleWith
public boolean isCompatibleWith(EGeometryType geometryType)
-
forGeometry
public static EGeometryType forGeometry(org.locationtech.jts.geom.Geometry geometry)
Returns theEGeometryTypefor a givenGeometry.- Parameters:
geometry- the geometry to check.- Returns:
- the type.
-
forGeometryType
public static EGeometryType forGeometryType(org.opengis.feature.type.GeometryType geometryType)
Returns theEGeometryTypefor a givenGeometryType.- Parameters:
geometryType- the geometry type to check.- Returns:
- the type.
-
forGeometryDescriptor
public static EGeometryType forGeometryDescriptor(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)
Returns theEGeometryTypefor a givenGeometryDescriptor.- Parameters:
geometryDescriptor- the geometry descriptor to check.- Returns:
- the type.
-
forWktName
public static EGeometryType forWktName(String wktName)
-
isLine
public static boolean isLine(org.locationtech.jts.geom.Geometry geometry)
Checks if the given geometry is aLineString(orMultiLineString) geometry.- Parameters:
geometry- the geometry to check.- Returns:
trueif there are lines in there.
-
isLine
public static boolean isLine(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)
Checks if the givenGeometryDescriptoris forLineString(orMultiLineString) geometry.- Parameters:
geometryDescriptor- the descriptor.- Returns:
trueif there are points in there.
-
isPolygon
public static boolean isPolygon(org.locationtech.jts.geom.Geometry geometry)
Checks if the given geometry is aPolygon(orMultiPolygon) geometry.- Parameters:
geometry- the geometry to check.- Returns:
trueif there are polygons in there.
-
isPolygon
public static boolean isPolygon(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)
Checks if the givenGeometryDescriptoris forPolygon(orMultiPolygon) geometry.- Parameters:
geometryDescriptor- the descriptor.- Returns:
trueif there are polygons in there.
-
isPoint
public static boolean isPoint(org.locationtech.jts.geom.Geometry geometry)
Checks if the given geometry is aPoint(orMultiPoint) geometry.- Parameters:
geometry- the geometry to check.- Returns:
trueif there are points in there.
-
isPoint
public static boolean isPoint(org.opengis.feature.type.GeometryDescriptor geometryDescriptor)
Checks if the givenGeometryDescriptoris forPoint(orMultiPoint) geometry.- Parameters:
geometryDescriptor- the descriptor.- Returns:
trueif there are points in there.
-
toSpatialiteGeometryType
public ESpatialiteGeometryType toSpatialiteGeometryType()
-
-