Package org.apache.calcite.runtime
Class SpatialTypeUtils
java.lang.Object
org.apache.calcite.runtime.SpatialTypeUtils
Utilities for spatial types.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumGeometry types, with the names and codes assigned by OGC. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.locationtech.jts.geom.GeometryFactory -
Method Summary
Modifier and TypeMethodDescriptionstatic StringasEwkt(org.locationtech.jts.geom.Geometry geometry) Returns the Extended Well-Known text (EWKT) representation of the geometry.static StringasGeoJson(org.locationtech.jts.geom.Geometry geometry) Returns the GeoJson representation of the geometry.static StringasGml(org.locationtech.jts.geom.Geometry geometry) Returns the GML representation of the geometry.static org.apache.calcite.avatica.util.ByteStringasWkb(org.locationtech.jts.geom.Geometry geometry) Returns the Extended Well-Known binary (WKB) representation of the geometry.static StringasWkt(org.locationtech.jts.geom.Geometry geometry) Returns the Well-Known text (WKT) representation of the geometry.static org.locationtech.jts.geom.GeometryConstructs a geometry from an Extended Well-Known text (EWKT) representation.static org.locationtech.jts.geom.GeometryfromGeoJson(String geoJson) Constructs a geometry from a GeoJson representation.static org.locationtech.jts.geom.GeometryConstructs a geometry from a GML representation.static org.locationtech.jts.geom.GeometryfromWkb(org.apache.calcite.avatica.util.ByteString wkb) Constructs a geometry from a Well-Known binary (WKB) representation.static org.locationtech.jts.geom.GeometryConstructs a geometry from a Well-Known text (WKT) representation.
-
Field Details
-
GEOMETRY_FACTORY
public static final org.locationtech.jts.geom.GeometryFactory GEOMETRY_FACTORY
-
-
Method Details
-
fromGeoJson
Constructs a geometry from a GeoJson representation.- Parameters:
geoJson- a GeoJson- Returns:
- a geometry
-
fromGml
Constructs a geometry from a GML representation.- Parameters:
gml- a GML- Returns:
- a geometry
-
fromWkb
public static org.locationtech.jts.geom.Geometry fromWkb(org.apache.calcite.avatica.util.ByteString wkb) Constructs a geometry from a Well-Known binary (WKB) representation.- Parameters:
wkb- a WKB- Returns:
- a geometry
-
fromEwkt
Constructs a geometry from an Extended Well-Known text (EWKT) representation. EWKT representations are prefixed with the SRID.- Parameters:
ewkt- an EWKT- Returns:
- a geometry
-
fromWkt
Constructs a geometry from a Well-Known text (WKT) representation.- Parameters:
wkt- a WKT- Returns:
- a geometry
-
asGeoJson
Returns the GeoJson representation of the geometry.- Parameters:
geometry- a geometry- Returns:
- a GeoJson
-
asGml
Returns the GML representation of the geometry.- Parameters:
geometry- a geometry- Returns:
- a GML
-
asWkb
public static org.apache.calcite.avatica.util.ByteString asWkb(org.locationtech.jts.geom.Geometry geometry) Returns the Extended Well-Known binary (WKB) representation of the geometry.- Parameters:
geometry- a geometry- Returns:
- an WKB
-
asEwkt
Returns the Extended Well-Known text (EWKT) representation of the geometry. EWKT representations are prefixed with the SRID.- Parameters:
geometry- a geometry- Returns:
- an EWKT
-
asWkt
Returns the Well-Known text (WKT) representation of the geometry.- Parameters:
geometry- a geometry- Returns:
- a WKT
-