GEOS 3.14.0dev
|
Writes a Geometry into Well-Known Binary format. More...
#include <WKBWriter.h>
Public Member Functions | |
WKBWriter (uint8_t dims=4, int bo=getMachineByteOrder(), bool includeSRID=false, int flv=WKBConstants::wkbExtended) | |
uint8_t | getOutputDimension () const |
void | setOutputDimension (uint8_t newOutputDimension) |
int | getByteOrder () const |
void | setByteOrder (int newByteOrder) |
bool | getIncludeSRID () const |
void | setIncludeSRID (bool newIncludeSRID) |
int | getFlavor () const |
void | setFlavor (int newFlavor) |
void | write (const geom::Geometry &g, std::ostream &os) |
Write a Geometry to an ostream. | |
void | writeHEX (const geom::Geometry &g, std::ostream &os) |
Write a Geometry to an ostream in binary hex format. | |
Static Public Member Functions | |
static int | getWkbType (const geom::Geometry &) |
Writes a Geometry into Well-Known Binary format.
The WKB format is specified in the OGC Simple Features for SQL specification. This implementation supports the extended WKB standard for representing Z and M coordinates. The presence of Z and/or M 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 LinearRing they will be written as LineString
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.
void geos::io::WKBWriter::write | ( | const geom::Geometry & | g, |
std::ostream & | os | ||
) |
Write a Geometry to an ostream.
g | the geometry to write |
os | the output stream |
IOException |
void geos::io::WKBWriter::writeHEX | ( | const geom::Geometry & | g, |
std::ostream & | os | ||
) |
Write a Geometry to an ostream in binary hex format.
g | the geometry to write |
os | the output stream |
IOException |