public abstract class GeographyValue extends GeospatialValue
Abstract base class for geography data values.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SRID
Default Spatial Reference System Identifier for Geography Values (4326).
|
| Constructor and Description |
|---|
GeographyValue() |
| Modifier and Type | Method and Description |
|---|---|
static GeographyValue |
castOptional(DataValue value)
For internal use only.
|
static GeographyValue |
castRequired(DataValue value)
For internal use only.
|
java.lang.String |
formatWKT()
See formatWKT(boolean).
|
abstract java.lang.String |
formatWKT(boolean sridRequired)
Return this value formatted in OData WKT (well-known text) format.
|
int |
getSrsCode()
Return spatial Reference System Code, e.g.
|
java.lang.String |
getSrsName()
Return (nullable) Spatial Reference System Name (optional).
|
static GeographyValue |
parseAny(java.lang.String text,
DataType type)
Parse a geography value from GeoJSON format.
|
static GeographyValue |
parseAnyWKT(java.lang.String text)
|
static GeographyValue |
parseAnyWKT(java.lang.String text,
boolean sridRequired)
Return a value parsed from OData WKT (well-known text) format.
|
void |
setSrsCode(int value)
Set spatial Reference System Code, e.g.
|
void |
setSrsName(java.lang.String value)
Set spatial Reference System Name (optional).
|
java.lang.String |
toString()
Convert this data value to a string.
|
cloneMutable, equals, getDataType, getTypeCode, hashCodepublic static final int DEFAULT_SRID
Default Spatial Reference System Identifier for Geography Values (4326).
public static GeographyValue castOptional(DataValue value)
For internal use only.
value - (internal use only)public static GeographyValue castRequired(DataValue value)
For internal use only.
value - (internal use only)public java.lang.String formatWKT()
public abstract java.lang.String formatWKT(boolean sridRequired)
Return this value formatted in OData WKT (well-known text) format.
sridRequired - Is SRID prefix required?public int getSrsCode()
Return spatial Reference System Code, e.g. EPSG SRID. Defaults to 4326.
getSrsCode in class GeospatialValuepublic java.lang.String getSrsName()
Return (nullable) Spatial Reference System Name (optional).
getSrsName in class GeospatialValuepublic static GeographyValue parseAny(java.lang.String text, DataType type)
Parse a geography value from GeoJSON format.
text - A value in GeoJSON format.type - A DataType.isGeography.public static GeographyValue parseAnyWKT(java.lang.String text)
text - Text parameter.public static GeographyValue parseAnyWKT(java.lang.String text, boolean sridRequired)
Return a value parsed from OData WKT (well-known text) format.
text - A value in OData WKT format.sridRequired - Is SRID prefix required?public void setSrsCode(int value)
Set spatial Reference System Code, e.g. EPSG SRID. Defaults to 4326.
setSrsCode in class GeospatialValuevalue - Spatial Reference System Code, e.g. EPSG SRID. Defaults to 4326.public void setSrsName(java.lang.String value)
Set spatial Reference System Name (optional).
setSrsName in class GeospatialValuevalue - Spatial Reference System Name (optional).public java.lang.String toString()
Convert this data value to a string.
If the GeographyValue.dataType is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used.
JSON format is used for structured values (arrays and objects).