Package oracle.spatial.util
Interface WKAdapter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
fromJGeometry(JGeometry geom)
This transforms a JGeometry to a WKB/WKT geometry.byte[]
fromSTRUCT(oracle.sql.STRUCT geom)
Creates a WKB/WKT geometry from a STRUCT object.JGeometry
toJGeometry(byte[] wkContent)
This transforms a WKB/WKT geometry to a JGeometry.oracle.sql.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
oracle.sql.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 convertedconn
- the connection to be used- Returns:
- an Oracle STRUCT object when successful; otherwise null
- Throws:
java.sql.SQLException
GeometryExceptionWithContext
-
fromSTRUCT
byte[] fromSTRUCT(oracle.sql.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
-
-