GEOS  3.14.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::io::WKBReader Class Reference

Reads a Geometry from Well-Known Binary format. More...

#include <WKBReader.h>

Public Member Functions

 WKBReader (geom::GeometryFactory const &f)
 
 WKBReader ()
 Initialize parser with default GeometryFactory.
 
void setFixStructure (bool doFixStructure)
 
std::unique_ptr< geom::Geometryread (std::istream &is)
 Reads a Geometry from an istream. More...
 
std::unique_ptr< geom::Geometryread (const unsigned char *buf, size_t size)
 Reads a Geometry from a buffer. More...
 
std::unique_ptr< geom::GeometryreadHEX (std::istream &is)
 Reads a Geometry from an istream in hex format. More...
 

Static Public Member Functions

static std::ostream & printHEX (std::istream &is, std::ostream &os)
 Print WKB in HEX form to out stream. More...
 

Detailed Description

Reads a Geometry from Well-Known Binary format.

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.

The Well-known Binary format is defined in the OpenGIS Simple Features Specification for SQL. This implementation supports the extended WKB standard which allows representing 3-dimensional coordinates.

Member Function Documentation

◆ printHEX()

static std::ostream& geos::io::WKBReader::printHEX ( std::istream &  is,
std::ostream &  os 
)
static

Print WKB in HEX form to out stream.

Parameters
isis the stream to read from
osis the stream to write to

◆ read() [1/2]

std::unique_ptr<geom::Geometry> geos::io::WKBReader::read ( const unsigned char *  buf,
size_t  size 
)

Reads a Geometry from a buffer.

Parameters
bufthe buffer to read from
sizethe size of the buffer in bytes
Returns
the Geometry read
Exceptions
IOException
ParseException

◆ read() [2/2]

std::unique_ptr<geom::Geometry> geos::io::WKBReader::read ( std::istream &  is)

Reads a Geometry from an istream.

Parameters
isthe stream to read from
Returns
the Geometry read
Exceptions
IOException
ParseException

◆ readHEX()

std::unique_ptr<geom::Geometry> geos::io::WKBReader::readHEX ( std::istream &  is)

Reads a Geometry from an istream in hex format.

Parameters
isthe stream to read from
Returns
the Geometry read
Exceptions
IOException
ParseException

The documentation for this class was generated from the following file: