|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vividsolutions.jts.io.WKBWriter
Writes a Geometry into Well-Known Binary format.
Supports use of an OutStream, which allows easy use
with arbitary byte stream sinks.
The WKB format is specified in the OGC Simple Features for SQL specification. This implementation supports the extended WKB standard for representing 3-dimensional coordinates. The presence of 3D coordinates is signified by setting the high bit of the wkbType word.
Empty Points cannot be represented in WKB; an
IllegalArgumentException will be thrown if one is
written. The WKB specification does not support representing LinearRings;
they will be written as LineStrings.
This class is designed to support reuse of a single instance to read multiple geometries. This class is not thread-safe; each thread should create its own instance.
WKBReader| Constructor Summary | |
WKBWriter()
Creates a writer that writes Geometrys with
output dimension = 2 and BIG_ENDIAN byte order |
|
WKBWriter(int outputDimension)
Creates a writer that writes Geometrys with
the given output dimension (2 or 3) and BIG_ENDIAN byte order |
|
WKBWriter(int outputDimension,
int byteOrder)
Creates a writer that writes Geometrys with
the given output dimension (2 or 3) and byte order |
|
| Method Summary | |
static java.lang.String |
bytesToHex(byte[] bytes)
|
byte[] |
write(Geometry geom)
Writes a Geometry into a byte array. |
void |
write(Geometry geom,
OutStream os)
Writes a Geometry to an OutStream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public WKBWriter()
Geometrys with
output dimension = 2 and BIG_ENDIAN byte order
public WKBWriter(int outputDimension)
Geometrys with
the given output dimension (2 or 3) and BIG_ENDIAN byte order
outputDimension - the dimension to output (2 or 3)
public WKBWriter(int outputDimension,
int byteOrder)
Geometrys with
the given output dimension (2 or 3) and byte order
outputDimension - the dimension to output (2 or 3)byteOrder - the byte ordering to use| Method Detail |
public static java.lang.String bytesToHex(byte[] bytes)
public byte[] write(Geometry geom)
Geometry into a byte array.
geom - the geometry to write
public void write(Geometry geom,
OutStream os)
throws java.io.IOException
Geometry to an OutStream.
geom - the geometry to writeos - the out stream to write to
java.io.IOException - if an I/O error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||