geodb
Class GeoDB

java.lang.Object
  extended by geodb.GeoDB

public class GeoDB
extends java.lang.Object


Constructor Summary
GeoDB()
           
 
Method Summary
static java.lang.String CheckSum()
          Returns the internal version of the GeoH2 bindings in order to track upgrades.
static void CreateSpatialIndex_GeoHash(java.sql.Connection cx, java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName)
           
static void CreateSpatialIndex(java.sql.Connection cx, java.lang.String schemaName, java.lang.String tableName, java.lang.String columnName, java.lang.String srid)
           
static void DropSpatialIndex(java.sql.Connection cx, java.lang.String schemaName, java.lang.String tableName)
           
static java.lang.String EnvelopeAsText(byte[] wkb)
          Returns the envelope of a geometry as text.
static com.vividsolutions.jts.geom.Envelope envFromWKB(byte[] wkb)
           
static byte[] envToWKB(double x1, double y1, double x2, double y2)
           
static byte[] envToWKB(double x1, double y1, double x2, double y2, byte[] wkb, int pos)
           
static byte[] envToWKB(com.vividsolutions.jts.geom.Envelope e)
           
static byte[] envToWKB(com.vividsolutions.jts.geom.Envelope e, byte[] wkb, int pos)
           
static java.lang.String GeometryType(byte[] wkb)
          Returns the type of the geometry as a string.
static java.lang.String GeoToolsVersion()
          Returns the current GeoH2 version.
static int GetSRID(java.sql.Connection cx, java.lang.String schemaName, java.lang.String tableName)
           
static com.vividsolutions.jts.geom.Geometry gFromEWKB(byte[] wkb)
           
static com.vividsolutions.jts.geom.Geometry gFromEWKB(byte[] wkb, com.vividsolutions.jts.io.WKBReader wkbreader)
           
static com.vividsolutions.jts.geom.Geometry gFromEWKT(java.lang.String wkt)
           
static com.vividsolutions.jts.geom.Geometry gFromWKB(byte[] wkb)
           
static com.vividsolutions.jts.geom.Geometry gFromWKB(byte[] wkb, com.vividsolutions.jts.io.WKBReader wkbreader)
           
static com.vividsolutions.jts.geom.Geometry gFromWKT(java.lang.String wkt, int srid)
           
static byte[] gToEWKB(com.vividsolutions.jts.geom.Geometry g)
           
static java.lang.String gToEWKT(com.vividsolutions.jts.geom.Geometry g)
           
static byte[] gToWKB(com.vividsolutions.jts.geom.Geometry g)
           
static java.lang.String gToWKT(com.vividsolutions.jts.geom.Geometry g)
           
static void InitGeoDB(java.sql.Connection cx)
           
static double ST_Area(byte[] wkb)
          Returns the area of the geometry if it is a polygon or multi-polygon.
static byte[] ST_AsEWKB(byte[] wkb)
          Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.
static java.lang.String ST_AsEWKT(byte[] wkb)
          Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.
static java.lang.String ST_AsHexEWKB(byte[] wkb)
          Returns a Geometry in HEXEWKB format (as text).
static java.lang.String ST_AsText(byte[] wkb)
          Return the Well-Known Text (WKT) representation of the geometry without SRID metadata.
static boolean ST_BBox(byte[] b1, byte[] b2)
          Returns true if two bounding boxes (specified as either geometries or boxes) intersect.
static byte[] ST_Buffer(byte[] wkb, double distance)
          Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance.
static byte[] ST_Centroid(byte[] wkb)
          Returns the geometric center of a geometry.
static boolean ST_Contains(byte[] wkb1, byte[] wkb2)
          Returns true if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A.
static boolean ST_Crosses(byte[] wkb1, byte[] wkb2)
          Returns TRUE if the supplied geometries have some, but not all, interior points in common.
static boolean ST_Disjoint(byte[] wkb1, byte[] wkb2)
          Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together.
static boolean ST_DWithin(byte[] wkb1, byte[] wkb2, double distance)
          Returns true if the geometries are within the specified distance of one another
static com.vividsolutions.jts.geom.Envelope ST_Envelope(byte[] wkb)
          Returns a geometry representing the bounding box of the supplied geometry.
static boolean ST_Equals(byte[] wkb1, byte[] wkb2)
          Returns true if the given geometries represent the same geometry.
static java.lang.String ST_GeoHash(byte[] wkb)
          Return a GeoHash representation (geohash.org) of the geometry.
static byte[] ST_GeomFromEWKB(byte[] wkb)
          Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).
static byte[] ST_GeomFromEWKT(java.lang.String wkt)
          Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).
static byte[] ST_GeomFromText(java.lang.String wkt, int srid)
          Return a specified ST_Geometry value from Well-Known Text representation (WKT).
static byte[] ST_GeomFromWKB(byte[] wkb, int srid)
          Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID.
static boolean ST_Intersects(byte[] wkb1, byte[] wkb2)
          Returns TRUE if the Geometries "spatially intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint).
static boolean ST_IsEmpty(byte[] wkb)
          Returns true if this Geometry is an empty geometry .
static boolean ST_IsSimple(byte[] wkb)
          Returns (TRUE) if this Geometry has no anomalous geometric points, such as self intersection or self tangency.
static boolean ST_IsValid(byte[] wkb)
          Returns true if the ST_Geometry is well formed.
static byte[] ST_MakeBox2D(byte[] wkb1, byte[] wkb2)
          Creates a BOX2D defined by the given point geometries.
static byte[] ST_MakeBox2D(double x1, double y1, double x2, double y2)
           
static boolean ST_Overlaps(byte[] wkb1, byte[] wkb2)
          Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other.
static byte[] ST_SetSRID(byte[] wkb, int srid)
          Sets the SRID on a geometry to a particular integer value.
static byte[] ST_Simplify(byte[] wkb, double tol)
          Returns a "simplified" version of the given geometry using the Douglas-Peuker algorithm.
static int ST_SRID(byte[] wkb)
          Returns the spatial reference identifier for the ST_Geometry.
static boolean ST_Touches(byte[] wkb1, byte[] wkb2)
          Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect.
static boolean ST_Within(byte[] wkb1, byte[] wkb2)
          Returns true if the geometry A is completely inside geometry B
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoDB

public GeoDB()
Method Detail

GeoToolsVersion

public static java.lang.String GeoToolsVersion()
Returns the current GeoH2 version.


CheckSum

public static java.lang.String CheckSum()
Returns the internal version of the GeoH2 bindings in order to track upgrades.


InitGeoDB

public static void InitGeoDB(java.sql.Connection cx)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

ST_AsText

public static java.lang.String ST_AsText(byte[] wkb)
Return the Well-Known Text (WKT) representation of the geometry without SRID metadata.


ST_AsEWKT

public static java.lang.String ST_AsEWKT(byte[] wkb)
Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.


ST_AsEWKB

public static byte[] ST_AsEWKB(byte[] wkb)
Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data.


ST_AsHexEWKB

public static java.lang.String ST_AsHexEWKB(byte[] wkb)
Returns a Geometry in HEXEWKB format (as text).


ST_GeoHash

public static java.lang.String ST_GeoHash(byte[] wkb)
Return a GeoHash representation (geohash.org) of the geometry.


ST_GeomFromEWKB

public static byte[] ST_GeomFromEWKB(byte[] wkb)
Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).


ST_GeomFromEWKT

public static byte[] ST_GeomFromEWKT(java.lang.String wkt)
Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).


ST_GeomFromText

public static byte[] ST_GeomFromText(java.lang.String wkt,
                                     int srid)
Return a specified ST_Geometry value from Well-Known Text representation (WKT).


ST_GeomFromWKB

public static byte[] ST_GeomFromWKB(byte[] wkb,
                                    int srid)
Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID.


ST_MakeBox2D

public static byte[] ST_MakeBox2D(byte[] wkb1,
                                  byte[] wkb2)
Creates a BOX2D defined by the given point geometries.


ST_MakeBox2D

public static byte[] ST_MakeBox2D(double x1,
                                  double y1,
                                  double x2,
                                  double y2)

GeometryType

public static java.lang.String GeometryType(byte[] wkb)
Returns the type of the geometry as a string. Eg: 'LINESTRING', 'POLYGON', 'MULTIPOINT', etc.


ST_Envelope

public static com.vividsolutions.jts.geom.Envelope ST_Envelope(byte[] wkb)
Returns a geometry representing the bounding box of the supplied geometry.


EnvelopeAsText

public static java.lang.String EnvelopeAsText(byte[] wkb)
Returns the envelope of a geometry as text.


ST_SRID

public static int ST_SRID(byte[] wkb)
Returns the spatial reference identifier for the ST_Geometry.


ST_IsValid

public static boolean ST_IsValid(byte[] wkb)
Returns true if the ST_Geometry is well formed.


ST_IsSimple

public static boolean ST_IsSimple(byte[] wkb)
Returns (TRUE) if this Geometry has no anomalous geometric points, such as self intersection or self tangency.


ST_IsEmpty

public static boolean ST_IsEmpty(byte[] wkb)
Returns true if this Geometry is an empty geometry . If true, then this Geometry represents the empty point set - i.e. GEOMETRYCOLLECTION(EMPTY).


ST_SetSRID

public static byte[] ST_SetSRID(byte[] wkb,
                                int srid)
Sets the SRID on a geometry to a particular integer value.


ST_Area

public static double ST_Area(byte[] wkb)
Returns the area of the geometry if it is a polygon or multi-polygon.


ST_BBox

public static boolean ST_BBox(byte[] b1,
                              byte[] b2)
Returns true if two bounding boxes (specified as either geometries or boxes) intersect.


ST_Centroid

public static byte[] ST_Centroid(byte[] wkb)
Returns the geometric center of a geometry.


ST_Crosses

public static boolean ST_Crosses(byte[] wkb1,
                                 byte[] wkb2)
Returns TRUE if the supplied geometries have some, but not all, interior points in common.


ST_Contains

public static boolean ST_Contains(byte[] wkb1,
                                  byte[] wkb2)
Returns true if and only if no points of B lie in the exterior of A, and at least one point of the interior of B lies in the interior of A.


ST_Disjoint

public static boolean ST_Disjoint(byte[] wkb1,
                                  byte[] wkb2)
Returns TRUE if the Geometries do not "spatially intersect" - if they do not share any space together.


ST_DWithin

public static boolean ST_DWithin(byte[] wkb1,
                                 byte[] wkb2,
                                 double distance)
Returns true if the geometries are within the specified distance of one another


ST_Equals

public static boolean ST_Equals(byte[] wkb1,
                                byte[] wkb2)
Returns true if the given geometries represent the same geometry. Directionality is ignored.


ST_Intersects

public static boolean ST_Intersects(byte[] wkb1,
                                    byte[] wkb2)
Returns TRUE if the Geometries "spatially intersect" - (share any portion of space) and FALSE if they don't (they are Disjoint).


ST_Overlaps

public static boolean ST_Overlaps(byte[] wkb1,
                                  byte[] wkb2)
Returns TRUE if the Geometries share space, are of the same dimension, but are not completely contained by each other.


ST_Touches

public static boolean ST_Touches(byte[] wkb1,
                                 byte[] wkb2)
Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect.


ST_Within

public static boolean ST_Within(byte[] wkb1,
                                byte[] wkb2)
Returns true if the geometry A is completely inside geometry B


ST_Buffer

public static byte[] ST_Buffer(byte[] wkb,
                               double distance)
Returns a geometry that represents all points whose distance from this Geometry is less than or equal to distance. Calculations are in the Spatial Reference System of this Geometry.


ST_Simplify

public static byte[] ST_Simplify(byte[] wkb,
                                 double tol)
Returns a "simplified" version of the given geometry using the Douglas-Peuker algorithm.


CreateSpatialIndex

public static void CreateSpatialIndex(java.sql.Connection cx,
                                      java.lang.String schemaName,
                                      java.lang.String tableName,
                                      java.lang.String columnName,
                                      java.lang.String srid)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

CreateSpatialIndex_GeoHash

public static void CreateSpatialIndex_GeoHash(java.sql.Connection cx,
                                              java.lang.String schemaName,
                                              java.lang.String tableName,
                                              java.lang.String columnName)
                                       throws java.sql.SQLException
Throws:
java.sql.SQLException

DropSpatialIndex

public static void DropSpatialIndex(java.sql.Connection cx,
                                    java.lang.String schemaName,
                                    java.lang.String tableName)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

GetSRID

public static int GetSRID(java.sql.Connection cx,
                          java.lang.String schemaName,
                          java.lang.String tableName)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

gToWKB

public static byte[] gToWKB(com.vividsolutions.jts.geom.Geometry g)

gToEWKB

public static byte[] gToEWKB(com.vividsolutions.jts.geom.Geometry g)

gFromWKB

public static com.vividsolutions.jts.geom.Geometry gFromWKB(byte[] wkb)

gFromWKB

public static com.vividsolutions.jts.geom.Geometry gFromWKB(byte[] wkb,
                                                            com.vividsolutions.jts.io.WKBReader wkbreader)

gFromEWKB

public static com.vividsolutions.jts.geom.Geometry gFromEWKB(byte[] wkb)

gFromEWKB

public static com.vividsolutions.jts.geom.Geometry gFromEWKB(byte[] wkb,
                                                             com.vividsolutions.jts.io.WKBReader wkbreader)

envToWKB

public static byte[] envToWKB(com.vividsolutions.jts.geom.Envelope e)

envToWKB

public static byte[] envToWKB(double x1,
                              double y1,
                              double x2,
                              double y2)

envToWKB

public static byte[] envToWKB(com.vividsolutions.jts.geom.Envelope e,
                              byte[] wkb,
                              int pos)

envToWKB

public static byte[] envToWKB(double x1,
                              double y1,
                              double x2,
                              double y2,
                              byte[] wkb,
                              int pos)

envFromWKB

public static com.vividsolutions.jts.geom.Envelope envFromWKB(byte[] wkb)

gFromWKT

public static com.vividsolutions.jts.geom.Geometry gFromWKT(java.lang.String wkt,
                                                            int srid)

gToWKT

public static java.lang.String gToWKT(com.vividsolutions.jts.geom.Geometry g)

gFromEWKT

public static com.vividsolutions.jts.geom.Geometry gFromEWKT(java.lang.String wkt)

gToEWKT

public static java.lang.String gToEWKT(com.vividsolutions.jts.geom.Geometry g)


Copyright © 2010. All Rights Reserved.