Package oracle.spatial.util
Class WKBasis
- java.lang.Object
-
- oracle.spatial.util.WKBasis
-
- All Implemented Interfaces:
WKAdapter
public abstract class WKBasis extends java.lang.Object implements WKAdapter
This class provides some implementations common to WKB and WKT, particularly the translation between WKB/WKT and STRUCT. This translation is based on the translation between WKB/WKT and JGeometry (which is specific to the WKB and WKT subclasses of this class).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
WKBasis.VectorOfDouble
protected class
WKBasis.VectorOfInt
-
Field Summary
Fields Modifier and Type Field Description protected static int
LABEL_WKB_CIRCULARSTRING
protected static int
LABEL_WKB_COMPOUNDCURVE
protected static int
LABEL_WKB_CURVEPOLYGON
protected static int
LABEL_WKB_GEOMETRYCOLLECTION
protected static int
LABEL_WKB_LINESTRING
protected static int
LABEL_WKB_MULTICURVE
protected static int
LABEL_WKB_MULTILINESTRING
protected static int
LABEL_WKB_MULTIPOINT
protected static int
LABEL_WKB_MULTIPOLYGON
protected static int
LABEL_WKB_MULTISURFACE
protected static int
LABEL_WKB_NURBSCURVE
protected static int
LABEL_WKB_POINT
protected static int
LABEL_WKB_POLYGON
protected static int
LABEL_WKT_CONTROLPOINTS
protected static int
LABEL_WKT_DEGREE
protected static int
LABEL_WKT_KNOT
protected static int
LABEL_WKT_KNOTS
protected static int
LABEL_WKT_MULTIPLICITY
protected static int
LABEL_WKT_NURBSPOINT
protected static int
LABEL_WKT_VALUE
protected static int
LABEL_WKT_WEIGHT
protected static int
LABEL_WKT_WEIGHTEDPOINT
protected ByteOrder
m_defaultByteOrder
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
determineCenterAndRadiusForArc(double arcX0, double arcY0, double arcX1, double arcY1, double arcX2, double arcY2, double[] centerX, double[] centerY, double[] radius)
byte[]
fromJGeometry(JGeometry geom)
This transforms a JGeometry to a WKB/WKT geometry.protected void
fromJGeometry(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)
protected void
fromJGeometry_CollectionElement(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel, int[] nextPosInEI)
protected void
fromJGeometry_ETYPE_1_1(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)
protected int
fromJGeometry_ETYPE_1_n(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean processOneElemOnly)
protected void
fromJGeometry_ETYPE_1_n_internal(JGeometry geom, int posInOrdinates, int numPoints, java.io.DataOutputStream out, ByteOrder byteOrder)
protected void
fromJGeometry_ETYPE_2(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int label, ByteOrder byteOrder, int outerGeometryLabel)
protected void
fromJGeometry_ETYPE_2_1(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
protected void
fromJGeometry_ETYPE_2_2(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
protected void
fromJGeometry_ETYPE_2_3(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
protected void
fromJGeometry_ETYPE_4(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
protected void
fromJGeometry_ETYPE_4_n(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
protected void
fromJGeometry_ETYPE_x003(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int outerLabel, ByteOrder byteOrder)
protected void
fromJGeometry_ETYPE_x003_optimized_circle(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean isInteriorRing)
protected void
fromJGeometry_ETYPE_x003_optimized_rectangle(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int outerLabel, ByteOrder byteOrder, boolean isInteriorRing)
protected void
fromJGeometry_ETYPE_x005(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)
protected int
fromJGeometry_GTYPE_COLLECTION(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)
protected int
fromJGeometry_GTYPE_CURVE(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
protected int
fromJGeometry_GTYPE_MULTICURVE(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)
protected int
fromJGeometry_GTYPE_MULTIPOINT(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean processOneElemOnly)
protected int
fromJGeometry_GTYPE_MULTIPOLYGON(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)
protected int
fromJGeometry_GTYPE_POINT(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
protected int
fromJGeometry_GTYPE_POLYGON(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)
byte[]
fromStruct(java.sql.Struct geom)
Creates a WKB/WKT geometry from a Struct object.byte[]
fromSTRUCT(oracle.sql.STRUCT geom)
Creates a WKB/WKT geometry from a STRUCT object.protected int
getEndPosInOrdinateArray(JGeometry geom, int posInElemInfo)
protected int
getStartPosInOrdinateArray(JGeometry geom, int posInElemInfo)
protected abstract WKInputStream
getWKInputStream(byte[] wkb)
protected abstract WKInputStream
getWKInputStream(java.lang.String wkt)
protected boolean
hasType(JGeometry geom, int posInElemInfo, int gType, int eType, int interpretation)
protected boolean
isInnerRing(int eType)
protected boolean
MDCGEQ(double a, double b, double tolerance)
protected int
readByte(WKInputStream in)
protected ByteOrder
readByteOrder(WKInputStream in)
protected double
readDouble(ByteOrder byteOrder, WKInputStream in)
protected void
readEndList(WKInputStream in)
protected void
readEndListOrSeparator(WKInputStream in)
protected int
readInnerLabel(WKInputStream in)
protected int
readLabel(WKInputStream in, ByteOrder byteOrder, int outerLabel)
protected void
readSeparator(WKInputStream in)
protected int
readStartList(ByteOrder byteOrder, WKInputStream in)
protected void
readStartList(WKInputStream in)
JGeometry
toJGeometry(byte[] wkb)
This transforms a WKB/WKT geometry to a JGeometry.JGeometry
toJGeometry(java.lang.String wkt)
protected void
toJGeometry(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, boolean putSinglePointIntoOrdinateArray, int outerLabel)
protected void
toJGeometry_WKB_CIRCULARSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_COLLECTION(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_COMPOUNDCURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel, int ringNum)
protected void
toJGeometry_WKB_CURVEPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_LINESTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_MULTICURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_MULTILINESTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_MULTIPOINT(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_MULTIPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_MULTISURFACE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_MULTIXXXPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel)
protected void
toJGeometry_WKB_MULTIXXXSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel)
protected void
toJGeometry_WKB_NURBSCURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_POINT(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, boolean putSinglePointIntoOrdinateArray, ByteOrder byteOrder, int outerLabel)
protected void
toJGeometry_WKB_POLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)
protected void
toJGeometry_WKB_XXXSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, int interpretation, ByteOrder byteOrder)
java.sql.Struct
toStruct(byte[] wkContent, java.sql.Connection conn)
Convert the given WKB/WKT geometry into an Oracle JDBC Struct object.java.sql.Struct
toStruct(java.lang.String wkContent, java.sql.Connection conn)
Convert the given WKB/WKT geometry into an Oracle JDBC Struct object.oracle.sql.STRUCT
toSTRUCT(byte[] wkContent, java.sql.Connection conn)
Convert the given WKB/WKT geometry into an Oracle JDBC STRUCT object.protected abstract void
writeBeginningOfList(java.io.DataOutputStream out)
protected abstract void
writeBeginningOfList(ByteOrder byteOrder, java.io.DataOutputStream out, int length)
protected abstract void
writeByte(java.io.DataOutputStream out, int b)
protected abstract void
writeByteOrder(java.io.DataOutputStream out)
protected abstract void
writeCoordPairSeparator(java.io.DataOutputStream out)
protected abstract void
writeDouble(ByteOrder byteOrder, java.io.DataOutputStream out, double value)
protected abstract void
writeEndOfList(java.io.DataOutputStream out)
protected abstract void
writeGeometrySeparator(java.io.DataOutputStream out)
protected abstract void
writeInnerLabel(java.io.DataOutputStream out, int label, int outerLabel)
protected abstract void
writeLabel(java.io.DataOutputStream out, int label, int outerLabel, ByteOrder byteOrder)
protected abstract void
writeXYSeparator(java.io.DataOutputStream out)
-
-
-
Field Detail
-
LABEL_WKB_POINT
protected static final int LABEL_WKB_POINT
- See Also:
- Constant Field Values
-
LABEL_WKB_LINESTRING
protected static final int LABEL_WKB_LINESTRING
- See Also:
- Constant Field Values
-
LABEL_WKB_CIRCULARSTRING
protected static final int LABEL_WKB_CIRCULARSTRING
- See Also:
- Constant Field Values
-
LABEL_WKB_COMPOUNDCURVE
protected static final int LABEL_WKB_COMPOUNDCURVE
- See Also:
- Constant Field Values
-
LABEL_WKB_POLYGON
protected static final int LABEL_WKB_POLYGON
- See Also:
- Constant Field Values
-
LABEL_WKB_CURVEPOLYGON
protected static final int LABEL_WKB_CURVEPOLYGON
- See Also:
- Constant Field Values
-
LABEL_WKB_MULTIPOINT
protected static final int LABEL_WKB_MULTIPOINT
- See Also:
- Constant Field Values
-
LABEL_WKB_MULTICURVE
protected static final int LABEL_WKB_MULTICURVE
- See Also:
- Constant Field Values
-
LABEL_WKB_MULTILINESTRING
protected static final int LABEL_WKB_MULTILINESTRING
- See Also:
- Constant Field Values
-
LABEL_WKB_MULTISURFACE
protected static final int LABEL_WKB_MULTISURFACE
- See Also:
- Constant Field Values
-
LABEL_WKB_MULTIPOLYGON
protected static final int LABEL_WKB_MULTIPOLYGON
- See Also:
- Constant Field Values
-
LABEL_WKB_GEOMETRYCOLLECTION
protected static final int LABEL_WKB_GEOMETRYCOLLECTION
- See Also:
- Constant Field Values
-
LABEL_WKB_NURBSCURVE
protected static final int LABEL_WKB_NURBSCURVE
- See Also:
- Constant Field Values
-
LABEL_WKT_DEGREE
protected static final int LABEL_WKT_DEGREE
- See Also:
- Constant Field Values
-
LABEL_WKT_CONTROLPOINTS
protected static final int LABEL_WKT_CONTROLPOINTS
- See Also:
- Constant Field Values
-
LABEL_WKT_NURBSPOINT
protected static final int LABEL_WKT_NURBSPOINT
- See Also:
- Constant Field Values
-
LABEL_WKT_WEIGHTEDPOINT
protected static final int LABEL_WKT_WEIGHTEDPOINT
- See Also:
- Constant Field Values
-
LABEL_WKT_WEIGHT
protected static final int LABEL_WKT_WEIGHT
- See Also:
- Constant Field Values
-
LABEL_WKT_KNOTS
protected static final int LABEL_WKT_KNOTS
- See Also:
- Constant Field Values
-
LABEL_WKT_KNOT
protected static final int LABEL_WKT_KNOT
- See Also:
- Constant Field Values
-
LABEL_WKT_VALUE
protected static final int LABEL_WKT_VALUE
- See Also:
- Constant Field Values
-
LABEL_WKT_MULTIPLICITY
protected static final int LABEL_WKT_MULTIPLICITY
- See Also:
- Constant Field Values
-
m_defaultByteOrder
protected final ByteOrder m_defaultByteOrder
-
-
Constructor Detail
-
WKBasis
public WKBasis(ByteOrder defaultByteOrder)
-
WKBasis
public WKBasis()
-
-
Method Detail
-
fromJGeometry
public byte[] fromJGeometry(JGeometry geom) throws GeometryExceptionWithContext
Description copied from interface:WKAdapter
This transforms a JGeometry to a WKB/WKT geometry.- Specified by:
fromJGeometry
in interfaceWKAdapter
- Parameters:
geom
- a JGeometry representing the Oracle Spatial geometry- Returns:
- a byte[] representing the WKB/WKT geometry
- Throws:
GeometryExceptionWithContext
-
fromJGeometry
protected void fromJGeometry(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_CollectionElement
protected void fromJGeometry_CollectionElement(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel, int[] nextPosInEI) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toSTRUCT
public final 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. This function is final, for it calls the function toJGeometry, which is not final. Any code specific to WKB/WKT should be in toJGeometry.- Specified by:
toSTRUCT
in interfaceWKAdapter
- 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
public final byte[] fromSTRUCT(oracle.sql.STRUCT geom) throws java.sql.SQLException, GeometryExceptionWithContext
Creates a WKB/WKT geometry from a STRUCT object. This function is final, for it calls the function fromJGeometry, which is not final. Any code specific to WKB/WKT should be in fromJGeometry.- Specified by:
fromSTRUCT
in interfaceWKAdapter
- 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
-
toStruct
public final java.sql.Struct toStruct(java.lang.String 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. This function is final, for it calls the function toJGeometry, which is not final. Any code specific to WKB/WKT should be in toJGeometry.- 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
- Since:
- 12cR1
-
toStruct
public final java.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. This function is final, for it calls the function toJGeometry, which is not final. Any code specific to WKB/WKT should be in toJGeometry.- 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
- Since:
- 12cR1
-
fromStruct
public final byte[] fromStruct(java.sql.Struct geom) throws java.sql.SQLException, GeometryExceptionWithContext
Creates a WKB/WKT geometry from a Struct object. This function is final, for it calls the function fromJGeometry, which is not final. Any code specific to WKB/WKT should be in fromJGeometry.- 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
- Since:
- 12cR1
-
fromJGeometry_ETYPE_1_1
protected void fromJGeometry_ETYPE_1_1(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_1_n_internal
protected void fromJGeometry_ETYPE_1_n_internal(JGeometry geom, int posInOrdinates, int numPoints, java.io.DataOutputStream out, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_1_n
protected int fromJGeometry_ETYPE_1_n(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean processOneElemOnly) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_2
protected void fromJGeometry_ETYPE_2(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int label, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_2_2
protected void fromJGeometry_ETYPE_2_2(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_x005
protected void fromJGeometry_ETYPE_x005(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_x003
protected void fromJGeometry_ETYPE_x003(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int outerLabel, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_x003_optimized_circle
protected void fromJGeometry_ETYPE_x003_optimized_circle(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean isInteriorRing) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_x003_optimized_rectangle
protected void fromJGeometry_ETYPE_x003_optimized_rectangle(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int outerLabel, ByteOrder byteOrder, boolean isInteriorRing) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_4_n
protected void fromJGeometry_ETYPE_4_n(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_4
protected void fromJGeometry_ETYPE_4(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_2_1
protected void fromJGeometry_ETYPE_2_1(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_ETYPE_2_3
protected void fromJGeometry_ETYPE_2_3(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_GTYPE_COLLECTION
protected int fromJGeometry_GTYPE_COLLECTION(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_GTYPE_CURVE
protected int fromJGeometry_GTYPE_CURVE(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_GTYPE_MULTICURVE
protected int fromJGeometry_GTYPE_MULTICURVE(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_GTYPE_MULTIPOINT
protected int fromJGeometry_GTYPE_MULTIPOINT(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean processOneElemOnly) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_GTYPE_MULTIPOLYGON
protected int fromJGeometry_GTYPE_MULTIPOLYGON(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
fromJGeometry_GTYPE_POINT
protected int fromJGeometry_GTYPE_POINT(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
determineCenterAndRadiusForArc
protected void determineCenterAndRadiusForArc(double arcX0, double arcY0, double arcX1, double arcY1, double arcX2, double arcY2, double[] centerX, double[] centerY, double[] radius)
-
MDCGEQ
protected boolean MDCGEQ(double a, double b, double tolerance)
-
fromJGeometry_GTYPE_POLYGON
protected int fromJGeometry_GTYPE_POLYGON(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
isInnerRing
protected boolean isInnerRing(int eType)
-
hasType
protected boolean hasType(JGeometry geom, int posInElemInfo, int gType, int eType, int interpretation)
-
getStartPosInOrdinateArray
protected int getStartPosInOrdinateArray(JGeometry geom, int posInElemInfo)
-
getEndPosInOrdinateArray
protected int getEndPosInOrdinateArray(JGeometry geom, int posInElemInfo)
-
toJGeometry
public JGeometry toJGeometry(byte[] wkb) throws GeometryExceptionWithContext
Description copied from interface:WKAdapter
This transforms a WKB/WKT geometry to a JGeometry.- Specified by:
toJGeometry
in interfaceWKAdapter
- Parameters:
wkb
- a byte[] representing the WKB/WKT geometry- Returns:
- a JGeometry representing the Oracle Spatial geometry
- Throws:
GeometryExceptionWithContext
-
toJGeometry
public JGeometry toJGeometry(java.lang.String wkt) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry
protected void toJGeometry(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, boolean putSinglePointIntoOrdinateArray, int outerLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_POINT
protected void toJGeometry_WKB_POINT(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, boolean putSinglePointIntoOrdinateArray, ByteOrder byteOrder, int outerLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_LINESTRING
protected void toJGeometry_WKB_LINESTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_XXXSTRING
protected void toJGeometry_WKB_XXXSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, int interpretation, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_NURBSCURVE
protected void toJGeometry_WKB_NURBSCURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_MULTIPOINT
protected void toJGeometry_WKB_MULTIPOINT(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_MULTILINESTRING
protected void toJGeometry_WKB_MULTILINESTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_MULTICURVE
protected void toJGeometry_WKB_MULTICURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_MULTIXXXSTRING
protected void toJGeometry_WKB_MULTIXXXSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_MULTIPOLYGON
protected void toJGeometry_WKB_MULTIPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_MULTISURFACE
protected void toJGeometry_WKB_MULTISURFACE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_MULTIXXXPOLYGON
protected void toJGeometry_WKB_MULTIXXXPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_COLLECTION
protected void toJGeometry_WKB_COLLECTION(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_POLYGON
protected void toJGeometry_WKB_POLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_COMPOUNDCURVE
protected void toJGeometry_WKB_COMPOUNDCURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel, int ringNum) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_CURVEPOLYGON
protected void toJGeometry_WKB_CURVEPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
toJGeometry_WKB_CIRCULARSTRING
protected void toJGeometry_WKB_CIRCULARSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
readSeparator
protected void readSeparator(WKInputStream in)
-
readEndList
protected void readEndList(WKInputStream in)
-
readEndListOrSeparator
protected void readEndListOrSeparator(WKInputStream in)
-
readDouble
protected double readDouble(ByteOrder byteOrder, WKInputStream in)
-
readStartList
protected void readStartList(WKInputStream in) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
readStartList
protected int readStartList(ByteOrder byteOrder, WKInputStream in) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
readByte
protected int readByte(WKInputStream in) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
readLabel
protected int readLabel(WKInputStream in, ByteOrder byteOrder, int outerLabel)
-
readInnerLabel
protected int readInnerLabel(WKInputStream in)
-
readByteOrder
protected ByteOrder readByteOrder(WKInputStream in) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeLabel
protected abstract void writeLabel(java.io.DataOutputStream out, int label, int outerLabel, ByteOrder byteOrder) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeInnerLabel
protected abstract void writeInnerLabel(java.io.DataOutputStream out, int label, int outerLabel) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeBeginningOfList
protected abstract void writeBeginningOfList(ByteOrder byteOrder, java.io.DataOutputStream out, int length) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeBeginningOfList
protected abstract void writeBeginningOfList(java.io.DataOutputStream out) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeDouble
protected abstract void writeDouble(ByteOrder byteOrder, java.io.DataOutputStream out, double value) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeXYSeparator
protected abstract void writeXYSeparator(java.io.DataOutputStream out) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeEndOfList
protected abstract void writeEndOfList(java.io.DataOutputStream out) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeGeometrySeparator
protected abstract void writeGeometrySeparator(java.io.DataOutputStream out) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeCoordPairSeparator
protected abstract void writeCoordPairSeparator(java.io.DataOutputStream out) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
getWKInputStream
protected abstract WKInputStream getWKInputStream(java.lang.String wkt)
-
getWKInputStream
protected abstract WKInputStream getWKInputStream(byte[] wkb)
-
writeByte
protected abstract void writeByte(java.io.DataOutputStream out, int b) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
writeByteOrder
protected abstract void writeByteOrder(java.io.DataOutputStream out) throws GeometryExceptionWithContext
- Throws:
GeometryExceptionWithContext
-
-