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 classWKBasis.VectorOfDoubleprotected classWKBasis.VectorOfInt
-
Field Summary
Fields Modifier and Type Field Description protected static intLABEL_WKB_CIRCULARSTRINGprotected static intLABEL_WKB_COMPOUNDCURVEprotected static intLABEL_WKB_CURVEPOLYGONprotected static intLABEL_WKB_GEOMETRYCOLLECTIONprotected static intLABEL_WKB_LINESTRINGprotected static intLABEL_WKB_MULTICURVEprotected static intLABEL_WKB_MULTILINESTRINGprotected static intLABEL_WKB_MULTIPOINTprotected static intLABEL_WKB_MULTIPOLYGONprotected static intLABEL_WKB_MULTISURFACEprotected static intLABEL_WKB_NURBSCURVEprotected static intLABEL_WKB_POINTprotected static intLABEL_WKB_POLYGONprotected static intLABEL_WKT_CONTROLPOINTSprotected static intLABEL_WKT_DEGREEprotected static intLABEL_WKT_KNOTprotected static intLABEL_WKT_KNOTSprotected static intLABEL_WKT_MULTIPLICITYprotected static intLABEL_WKT_NURBSPOINTprotected static intLABEL_WKT_VALUEprotected static intLABEL_WKT_WEIGHTprotected static intLABEL_WKT_WEIGHTEDPOINTprotected ByteOrderm_defaultByteOrder
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddetermineCenterAndRadiusForArc(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 voidfromJGeometry(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)protected voidfromJGeometry_CollectionElement(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel, int[] nextPosInEI)protected voidfromJGeometry_ETYPE_1_1(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)protected intfromJGeometry_ETYPE_1_n(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean processOneElemOnly)protected voidfromJGeometry_ETYPE_1_n_internal(JGeometry geom, int posInOrdinates, int numPoints, java.io.DataOutputStream out, ByteOrder byteOrder)protected voidfromJGeometry_ETYPE_2(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int label, ByteOrder byteOrder, int outerGeometryLabel)protected voidfromJGeometry_ETYPE_2_1(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)protected voidfromJGeometry_ETYPE_2_2(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)protected voidfromJGeometry_ETYPE_2_3(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)protected voidfromJGeometry_ETYPE_4(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)protected voidfromJGeometry_ETYPE_4_n(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)protected voidfromJGeometry_ETYPE_x003(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int outerLabel, ByteOrder byteOrder)protected voidfromJGeometry_ETYPE_x003_optimized_circle(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean isInteriorRing)protected voidfromJGeometry_ETYPE_x003_optimized_rectangle(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, int outerLabel, ByteOrder byteOrder, boolean isInteriorRing)protected voidfromJGeometry_ETYPE_x005(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)protected intfromJGeometry_GTYPE_COLLECTION(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)protected intfromJGeometry_GTYPE_CURVE(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)protected intfromJGeometry_GTYPE_MULTICURVE(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)protected intfromJGeometry_GTYPE_MULTIPOINT(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, boolean processOneElemOnly)protected intfromJGeometry_GTYPE_MULTIPOLYGON(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder)protected intfromJGeometry_GTYPE_POINT(JGeometry geom, int posInElemInfo, java.io.DataOutputStream out, ByteOrder byteOrder, int outerGeometryLabel)protected intfromJGeometry_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 intgetEndPosInOrdinateArray(JGeometry geom, int posInElemInfo)protected intgetStartPosInOrdinateArray(JGeometry geom, int posInElemInfo)protected abstract WKInputStreamgetWKInputStream(byte[] wkb)protected abstract WKInputStreamgetWKInputStream(java.lang.String wkt)protected booleanhasType(JGeometry geom, int posInElemInfo, int gType, int eType, int interpretation)protected booleanisInnerRing(int eType)protected booleanMDCGEQ(double a, double b, double tolerance)protected intreadByte(WKInputStream in)protected ByteOrderreadByteOrder(WKInputStream in)protected doublereadDouble(ByteOrder byteOrder, WKInputStream in)protected voidreadEndList(WKInputStream in)protected voidreadEndListOrSeparator(WKInputStream in)protected intreadInnerLabel(WKInputStream in)protected intreadLabel(WKInputStream in, ByteOrder byteOrder, int outerLabel)protected voidreadSeparator(WKInputStream in)protected intreadStartList(ByteOrder byteOrder, WKInputStream in)protected voidreadStartList(WKInputStream in)JGeometrytoJGeometry(byte[] wkb)This transforms a WKB/WKT geometry to a JGeometry.JGeometrytoJGeometry(java.lang.String wkt)protected voidtoJGeometry(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, boolean putSinglePointIntoOrdinateArray, int outerLabel)protected voidtoJGeometry_WKB_CIRCULARSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_COLLECTION(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_COMPOUNDCURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel, int ringNum)protected voidtoJGeometry_WKB_CURVEPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_LINESTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_MULTICURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_MULTILINESTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_MULTIPOINT(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_MULTIPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_MULTISURFACE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_MULTIXXXPOLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel)protected voidtoJGeometry_WKB_MULTIXXXSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder, int outerLabel)protected voidtoJGeometry_WKB_NURBSCURVE(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_POINT(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, boolean putSinglePointIntoOrdinateArray, ByteOrder byteOrder, int outerLabel)protected voidtoJGeometry_WKB_POLYGON(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, ByteOrder byteOrder)protected voidtoJGeometry_WKB_XXXSTRING(WKInputStream in, WKBasis.VectorOfInt gType, WKBasis.VectorOfDouble point, WKBasis.VectorOfInt elemInfo, WKBasis.VectorOfDouble ordinates, int interpretation, ByteOrder byteOrder)java.sql.StructtoStruct(byte[] wkContent, java.sql.Connection conn)Convert the given WKB/WKT geometry into an Oracle JDBC Struct object.java.sql.StructtoStruct(java.lang.String wkContent, java.sql.Connection conn)Convert the given WKB/WKT geometry into an Oracle JDBC Struct object.oracle.sql.STRUCTtoSTRUCT(byte[] wkContent, java.sql.Connection conn)Convert the given WKB/WKT geometry into an Oracle JDBC STRUCT object.protected abstract voidwriteBeginningOfList(java.io.DataOutputStream out)protected abstract voidwriteBeginningOfList(ByteOrder byteOrder, java.io.DataOutputStream out, int length)protected abstract voidwriteByte(java.io.DataOutputStream out, int b)protected abstract voidwriteByteOrder(java.io.DataOutputStream out)protected abstract voidwriteCoordPairSeparator(java.io.DataOutputStream out)protected abstract voidwriteDouble(ByteOrder byteOrder, java.io.DataOutputStream out, double value)protected abstract voidwriteEndOfList(java.io.DataOutputStream out)protected abstract voidwriteGeometrySeparator(java.io.DataOutputStream out)protected abstract voidwriteInnerLabel(java.io.DataOutputStream out, int label, int outerLabel)protected abstract voidwriteLabel(java.io.DataOutputStream out, int label, int outerLabel, ByteOrder byteOrder)protected abstract voidwriteXYSeparator(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:WKAdapterThis transforms a JGeometry to a WKB/WKT geometry.- Specified by:
fromJGeometryin 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, GeometryExceptionWithContextConvert 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:
toSTRUCTin 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.SQLExceptionGeometryExceptionWithContext
-
fromSTRUCT
public final byte[] fromSTRUCT(oracle.sql.STRUCT geom) throws java.sql.SQLException, GeometryExceptionWithContextCreates 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:
fromSTRUCTin 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.SQLExceptionGeometryExceptionWithContext
-
toStruct
public final java.sql.Struct toStruct(java.lang.String wkContent, java.sql.Connection conn) throws java.sql.SQLException, GeometryExceptionWithContextConvert 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.SQLExceptionGeometryExceptionWithContext- Since:
- 12cR1
-
toStruct
public final java.sql.Struct toStruct(byte[] wkContent, java.sql.Connection conn) throws java.sql.SQLException, GeometryExceptionWithContextConvert 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.SQLExceptionGeometryExceptionWithContext- Since:
- 12cR1
-
fromStruct
public final byte[] fromStruct(java.sql.Struct geom) throws java.sql.SQLException, GeometryExceptionWithContextCreates 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.SQLExceptionGeometryExceptionWithContext- 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:WKAdapterThis transforms a WKB/WKT geometry to a JGeometry.- Specified by:
toJGeometryin 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
-
-