SFCGAL 2.0.0
SFCGAL::detail::io::WkbReader Class Reference

read WKB geometry More...

#include <WkbReader.h>

Public Member Functions

 WkbReader (std::istream &wkbString, bool asHexString=false)
 read WKB from input stream
auto readWkb () -> void
auto geometry () -> std::unique_ptr< SFCGAL::Geometry >
 Returns the geometry from the (E)WKB.
auto preparedGeometry () -> std::unique_ptr< SFCGAL::PreparedGeometry >
 Returns the prepared geometry from the (E)WKB.
auto srid () const -> srid_t
 Returns the srid from the (E)WKB.

Detailed Description

read WKB geometry

Constructor & Destructor Documentation

◆ WkbReader()

SFCGAL::detail::io::WkbReader::WkbReader ( std::istream & wkbString,
bool asHexString = false )
inline

read WKB from input stream

Parameters
wkbStringhexadecimal ascii string or binary string
asHexStringif false, will read the wkb as binary string, else will read the string as hex ascii string (ie. 2 chars for 1 byte with values matching [0-9A-F]

Member Function Documentation

◆ geometry()

auto SFCGAL::detail::io::WkbReader::geometry ( ) -> std::unique_ptr<SFCGAL::Geometry>
inline

Returns the geometry from the (E)WKB.

Must be used after readWkb

◆ preparedGeometry()

auto SFCGAL::detail::io::WkbReader::preparedGeometry ( ) -> std::unique_ptr<SFCGAL::PreparedGeometry>
inline

Returns the prepared geometry from the (E)WKB.

Must be used after readWkb

◆ readWkb()

auto SFCGAL::detail::io::WkbReader::readWkb ( ) -> void
inline

◆ srid()

auto SFCGAL::detail::io::WkbReader::srid ( ) const -> srid_t
inlinenodiscard

Returns the srid from the (E)WKB.

Must be used after readWkb