Package org.geotools.styling
Enum Class UomOgcMapping
- All Implemented Interfaces:
Serializable
,Comparable<UomOgcMapping>
,Constable
Defines the Units of Measure (UOMs) specified by the OGC SE standard and their mappings to Java Units defined in
javax.measure.unit
. Each entry in this enum provides both the Java Unit for the given UOM and the
corresponding String that is defined by the SE standard.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic UomOgcMapping
Returns the appropriate UOM mapping for a given OGC SE standard string.static UomOgcMapping
get
(Unit<Length> unit) Returns the appropriate UOM mapping for a given Java Unit.Returns the String defined by the OGC SE specification for the unit of measure.Unit<Length>
getUnit()
Returns the Java Unit that corresponds to the unit of measure.toString()
static UomOgcMapping
Returns the enum constant of this class with the specified name.static UomOgcMapping[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
METRE
-
FOOT
-
PIXEL
-
-
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
-
toString
- Overrides:
toString
in classEnum<UomOgcMapping>
-
getSEString
Returns the String defined by the OGC SE specification for the unit of measure.- Returns:
- a String that follows the OGC SE specification
-
getUnit
public Unit<Length> getUnit()Returns the Java Unit that corresponds to the unit of measure.- Returns:
- a Java Unit (e.g.,
SI.METRE
).
-
get
Returns the appropriate UOM mapping for a given OGC SE standard string.- Parameters:
seString
- a String that follows the OGC SE specification.- Returns:
- the corresponding UnitOfMeasure.
- Throws:
IllegalArgumentException
- if the provided String is not a valid OGC SE value.
-
get
Returns the appropriate UOM mapping for a given Java Unit.- Parameters:
unit
- a Java Unit (e.g.,SI.METRE
).- Returns:
- the corresponding UnitOfMeasure.
- Throws:
IllegalArgumentException
- if the provided Unit is not part of the OGC SE specification.
-