Package org.apache.calcite.runtime
Class SpatialTypeUtils
java.lang.Object
org.apache.calcite.runtime.SpatialTypeUtils
Utilities for spatial types.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumGeometry types, with the names and codes assigned by OGC.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final org.locationtech.jts.geom.GeometryFactory
- 
Method SummaryModifier 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_FACTORYpublic static final org.locationtech.jts.geom.GeometryFactory GEOMETRY_FACTORY
 
- 
- 
Method Details- 
fromGeoJsonConstructs a geometry from a GeoJson representation.- Parameters:
- geoJson- a GeoJson
- Returns:
- a geometry
 
- 
fromGmlConstructs a geometry from a GML representation.- Parameters:
- gml- a GML
- Returns:
- a geometry
 
- 
fromWkbpublic 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
 
- 
fromEwktConstructs a geometry from an Extended Well-Known text (EWKT) representation. EWKT representations are prefixed with the SRID.- Parameters:
- ewkt- an EWKT
- Returns:
- a geometry
 
- 
fromWktConstructs a geometry from a Well-Known text (WKT) representation.- Parameters:
- wkt- a WKT
- Returns:
- a geometry
 
- 
asGeoJsonReturns the GeoJson representation of the geometry.- Parameters:
- geometry- a geometry
- Returns:
- a GeoJson
 
- 
asGmlReturns the GML representation of the geometry.- Parameters:
- geometry- a geometry
- Returns:
- a GML
 
- 
asWkbpublic 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
 
- 
asEwktReturns the Extended Well-Known text (EWKT) representation of the geometry. EWKT representations are prefixed with the SRID.- Parameters:
- geometry- a geometry
- Returns:
- an EWKT
 
- 
asWktReturns the Well-Known text (WKT) representation of the geometry.- Parameters:
- geometry- a geometry
- Returns:
- a WKT
 
 
-