Package net.sf.eBusx.geo
Enum GeoObject.GeoType
- java.lang.Object
-
- java.lang.Enum<GeoObject.GeoType>
-
- net.sf.eBusx.geo.GeoObject.GeoType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<GeoObject.GeoType>
- Enclosing class:
- GeoObject
public static enum GeoObject.GeoType extends java.lang.Enum<GeoObject.GeoType>
Enumerates GeoJSON geo-spatial data types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CIRCLE
GeoJSON circle.ELLIPSE
GeoJSON ellipse.GEO_COLLECTION
Multiple GeoJSON objects of different types.LINE_STRING
Contains two or more GeoJSON positions.MULTI_LINE_STRING
Multiple GeoJSONline strings
.MULTI_POLYGON
Multiple GeoJSONpolygons
.MULTIPOINT
Multiple GeoJSONpositions
.POINT
Single GeoJSONposition
.POLYGON
GeoJSON polygon contain one or more linear rings.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GeoObject.GeoType
findType(java.lang.String s)
ReturnsGeoType
with the given name.java.lang.Class<? extends GeoObject>
jsonClass()
Returns GeoJSON class.java.lang.String
jsonName()
Returns GeoJSON type name.static GeoObject.GeoType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static GeoObject.GeoType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
POINT
public static final GeoObject.GeoType POINT
Single GeoJSONposition
.
-
MULTIPOINT
public static final GeoObject.GeoType MULTIPOINT
Multiple GeoJSONpositions
.
-
LINE_STRING
public static final GeoObject.GeoType LINE_STRING
Contains two or more GeoJSON positions.
-
MULTI_LINE_STRING
public static final GeoObject.GeoType MULTI_LINE_STRING
Multiple GeoJSONline strings
.
-
POLYGON
public static final GeoObject.GeoType POLYGON
GeoJSON polygon contain one or more linear rings.
-
MULTI_POLYGON
public static final GeoObject.GeoType MULTI_POLYGON
Multiple GeoJSONpolygons
.
-
GEO_COLLECTION
public static final GeoObject.GeoType GEO_COLLECTION
Multiple GeoJSON objects of different types.
-
CIRCLE
public static final GeoObject.GeoType CIRCLE
GeoJSON circle.
-
ELLIPSE
public static final GeoObject.GeoType ELLIPSE
GeoJSON ellipse.
-
-
Method Detail
-
values
public static GeoObject.GeoType[] 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 (GeoObject.GeoType c : GeoObject.GeoType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GeoObject.GeoType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
jsonName
public java.lang.String jsonName()
Returns GeoJSON type name.- Returns:
- GeoJSON name.
-
jsonClass
public java.lang.Class<? extends GeoObject> jsonClass()
Returns GeoJSON class.- Returns:
- GeoJSON class.
-
findType
@Nullable public static GeoObject.GeoType findType(java.lang.String s)
ReturnsGeoType
with the given name. If there is no such type with the name, then returnsnull
.- Parameters:
s
-GeoObject
type name.- Returns:
GeoObject
type.
-
-