Package org.geotools.data.h2
Class JTS
Object
JTS
Static collection of JTS operations.
- Author:
- David Blasby, The Open Planning Project, dblasby@openplans.org, Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
AsWKT
(byte[] wkb) Returns the Well Known Text of the geometry.static Envelope
Envelope
(byte[] wkb) Returns the envelope for a geometry.static String
EnvelopeAsText
(byte[] wkb) Returns the text representation of the envelope of the geometry.static String
GeometryType
(byte[] wkb) Returns the type of the geometry as a string.static byte[]
GeomFromText
(String wkt, int srid) Reads a geometry from its well known text representation, specifying an srid.static byte[]
GeomFromWKB
(byte[] wkb) static String
Returns the current GeoTools version.static int
GetSRID
(byte[] wkb) Returns the spatial reference identifier for the geometry.
-
Constructor Details
-
JTS
public JTS()
-
-
Method Details
-
GeoToolsVersion
Returns the current GeoTools version. -
AsWKT
Returns the Well Known Text of the geometry. -
EnvelopeAsText
Returns the text representation of the envelope of the geometry. -
GeomFromText
Reads a geometry from its well known text representation, specifying an srid.- Parameters:
wkt
- The well known text of the geometry.srid
- The srid of the geometry- Returns:
- An array of bytes representing the geometry.
-
GeomFromWKB
public static byte[] GeomFromWKB(byte[] wkb) -
GetSRID
public static int GetSRID(byte[] wkb) Returns the spatial reference identifier for the geometry.This method will return -1 if wkb is
null
.- Parameters:
wkb
- The geometry.- Returns:
- The srid.
-
Envelope
Returns the envelope for a geometry.This method will return an "null" envelope (
Envelope.setToNull()
) if wkb isnull
.- Parameters:
wkb
- The geometry.- Returns:
- The envelope of the geometry.
-
GeometryType
Returns the type of the geometry as a string. Eg: 'LINESTRING', 'POLYGON', 'MULTIPOINT', etc.This method returns
null
when wkb isnull
.- Parameters:
wkb
- The geometry.
-