Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)
B28401-01


oracle.spatial.util
Interface WKAdapter

All Known Implementing Classes:
WKB, WKBasis, WKT

public interface WKAdapter

Method Summary
 byte[] fromJGeometry(JGeometry geom)
          This transforms a JGeometry to a WKB/WKT geometry.
 byte[] fromSTRUCT(STRUCT geom)
          Creates a WKB/WKT geometry from a STRUCT object.
 JGeometry toJGeometry(byte[] wkContent)
          This transforms a WKB/WKT geometry to a JGeometry.
 STRUCT toSTRUCT(byte[] wkContent, java.sql.Connection conn)
          Convert the given WKB/WKT geometry into an Oracle JDBC STRUCT object.

 

Method Detail

toJGeometry

JGeometry toJGeometry(byte[] wkContent)
                      throws GeometryExceptionWithContext
This transforms a WKB/WKT geometry to a JGeometry.
Parameters:
wkContent - a byte[] representing the WKB/WKT geometry
Returns:
a JGeometry representing the Oracle Spatial geometry
Throws:
GeometryExceptionWithContext

fromJGeometry

byte[] fromJGeometry(JGeometry geom)
                     throws GeometryExceptionWithContext
This transforms a JGeometry to a WKB/WKT geometry.
Parameters:
geom - a JGeometry representing the Oracle Spatial geometry
Returns:
a byte[] representing the WKB/WKT geometry
Throws:
GeometryExceptionWithContext

toSTRUCT

STRUCT toSTRUCT(byte[] wkContent,
                java.sql.Connection conn)
                throws java.sql.SQLException,
                       GeometryExceptionWithContext
Convert the given WKB/WKT geometry into an Oracle JDBC STRUCT object. You can then bind the STRUCT object to a SQL DML statment.
Parameters:
wkContent - the WKB/WKT geometry (byte array) to be converted
conn - the connection to be used
Returns:
an Oracle STRUCT object when successful; otherwise null
Throws:
java.sql.SQLException
GeometryExceptionWithContext

fromSTRUCT

byte[] fromSTRUCT(STRUCT geom)
                  throws java.sql.SQLException,
                         GeometryExceptionWithContext
Creates a WKB/WKT geometry from a STRUCT object.
Parameters:
geom - the STRUCT object from an oracle result set
Returns:
a WKB/WKT geometry (byte array) if successful; otherwise null
Throws:
java.sql.SQLException
GeometryExceptionWithContext

Skip navigation links

Oracle® Spatial Java API Reference
11g Release 1 (11.1)
B28401-01


Copyright © 2007, Oracle. All Rights Reserved.