SFCGAL 2.3.0
SFCGAL::detail::io::WkbWriter Class Reference

Writer for WKB. More...

#include <WkbWriter.h>

Public Member Functions

 WkbWriter (std::ostream &outputStream, bool asHexString=false)
 Construct WKB writer.
void write (const Geometry &geometry, boost::endian::order wkbOrder=boost::endian::order::native)
 write WKB for a geometry wkbOrder is the native endianness by default.
void write (const Geometry &geometry, const srid_t &srid, boost::endian::order wkbOrder=boost::endian::order::native)
 write EWKB for a geometry wkbOrder is the native endianness by default.

Detailed Description

Writer for WKB.

Constructor & Destructor Documentation

◆ WkbWriter()

SFCGAL::detail::io::WkbWriter::WkbWriter ( std::ostream & outputStream,
bool asHexString = false )
inline

Construct WKB writer.

Parameters
outputStreamOutput stream to write WKB data to
asHexStringIf true, output as hexadecimal string, otherwise binary

Member Function Documentation

◆ write() [1/2]

void SFCGAL::detail::io::WkbWriter::write ( const Geometry & geometry,
boost::endian::order wkbOrder = boost::endian::order::native )

write WKB for a geometry wkbOrder is the native endianness by default.

Parameters
geometryGeometry to write as WKB
wkbOrderByte order for WKB output

◆ write() [2/2]

void SFCGAL::detail::io::WkbWriter::write ( const Geometry & geometry,
const srid_t & srid,
boost::endian::order wkbOrder = boost::endian::order::native )

write EWKB for a geometry wkbOrder is the native endianness by default.

Parameters
geometryGeometry to write as EWKB
sridSpatial reference identifier to include in EWKB
wkbOrderByte order for WKB output