Package nz.org.riskscape.engine.geo
Enum Class GeometryFamily
- All Implemented Interfaces:
Serializable
,Comparable<GeometryFamily>
,Constable
An enumeration of the main Geometry type 'families' we support in RiskScape, ranked in terms of their lowest-common-denominator-y-ness when intersecting each other, e.g. intersection of points and polygons results in points, so polygons are ranked higher than points as they are more 'specific'.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeometryFamily
from
(org.locationtech.jts.geom.Geometry geometry) static GeometryFamily
Return theGeometryFamily
of fromClass.Class<?>
boolean
isSameFamily
(org.locationtech.jts.geom.Geometry geom) min
(GeometryFamily rhs) Returns the lesser of the two geometry types - equivalent to the expected type when intersecting two geometries of the given types, excluding weird peripheral geometries such as glancing points and linesstatic GeometryFamily
Returns the enum constant of this class with the specified name.static GeometryFamily[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PUNTAL
-
LINEAL
-
POLYGONAL
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
from
- Returns:
- the GeometryFamily for the given geometry
-
fromClass
Return the
GeometryFamily
of fromClass. If fromClass is not a specific geometry type then null will be returned.- Returns:
- the GeometryFamily for the given geometry class
-
min
Returns the lesser of the two geometry types - equivalent to the expected type when intersecting two geometries of the given types, excluding weird peripheral geometries such as glancing points and lines
-
isSameFamily
public boolean isSameFamily(org.locationtech.jts.geom.Geometry geom) - Returns:
- true if geom is a member of this geometry family, false otherwise
-
getFamilyClass
-