Package dev.frostlake.values
Class GeoValue
java.lang.Object
dev.frostlake.values.GeoValue
- All Implemented Interfaces:
Serializable,Comparable<GeoValue>
Runtime value of the GEOGRAPHY / GEOMETRY types: the GeoJSON model (
{"coordinates": …,
"type": "Point"} with sorted keys, Snowflake's default output form) plus the KIND — geography
(spherical, SRID 4326) or geometry (planar, SRID configurable, default 0). Stringification is the
compact GeoJSON text (this engine's display policy; Snowflake pretty-prints the same JSON), and
equality/ordering/hashing follow it.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintbooleangeoJson()The compact GeoJSON text.geoType()The GeoJSON geometry type name (Point,LineString, …).intgetSrid()inthashCode()booleanTRUE for GEOGRAPHY (spherical), FALSE for GEOMETRY (planar).kindName()The SQL type name for error messages: GEOGRAPHY or GEOMETRY.tools.jackson.databind.JsonNodenode()The parsed GeoJSON tree (parsed on first access; re-parsed after deserialization).static GeoValueofNode(tools.jackson.databind.JsonNode node, boolean geography, int srid) Wraps a parsed GeoJSON tree (keys already sorted), rendering its compact text once.toString()
-
Method Details
-
ofNode
Wraps a parsed GeoJSON tree (keys already sorted), rendering its compact text once. -
geoJson
The compact GeoJSON text. -
node
public tools.jackson.databind.JsonNode node()The parsed GeoJSON tree (parsed on first access; re-parsed after deserialization). -
isGeography
public boolean isGeography()TRUE for GEOGRAPHY (spherical), FALSE for GEOMETRY (planar). -
getSrid
public int getSrid() -
geoType
The GeoJSON geometry type name (Point,LineString, …). -
kindName
The SQL type name for error messages: GEOGRAPHY or GEOMETRY. -
toString
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<GeoValue>
-