Package org.geotools.data.db2
Class DB2WKBWriter
Object
DB2WKBWriter
- Author:
- Christian Mueller
Version of JTS WKB Writer adjusted for DB2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDB2WKBWriter
(boolean hasOGCWkbZTyps) Creates a writer that writesGeometry
usingBIG_ENDIAN
byte order.DB2WKBWriter
(int byteOrder, boolean hasOGCWkbZTyps) Creates a writer that writesGeometry
s in the given byte order If the input geometry has a small coordinate dimension, coordinates will be padded withNULL_ORDINATE
. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
bytesToHex
(byte[] bytes) int
static final int
returns the coordinate dimension for a geometrybyte[]
Writes aGeometry
into a byte array.void
-
Constructor Details
-
DB2WKBWriter
public DB2WKBWriter(boolean hasOGCWkbZTyps) Creates a writer that writesGeometry
usingBIG_ENDIAN
byte order. If the input geometry has a small coordinate dimension, coordinates will be padded withNULL_ORDINATE
. -
DB2WKBWriter
public DB2WKBWriter(int byteOrder, boolean hasOGCWkbZTyps) Creates a writer that writesGeometry
s in the given byte order If the input geometry has a small coordinate dimension, coordinates will be padded withNULL_ORDINATE
.- Parameters:
byteOrder
- the byte ordering to use
-
-
Method Details
-
guessCoordinateDimension
returns the coordinate dimension for a geometry- Parameters:
g
- the geometry- Returns:
- if there is one z value != NaN, then 3 else 2
-
bytesToHex
-
write
Writes aGeometry
into a byte array.- Parameters:
geom
- the geometry to write- Returns:
- the byte array containing the WKB
-
write
- Parameters:
geom
- the geometry to writeos
- the out stream to write to- Throws:
IOException
- if an I/O error occurs
-
getOutputDimension
public int getOutputDimension()
-