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

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

#include <WKBReader.h>

Collaboration diagram for geos::io::WKBReader:
[legend]

Public Member Functions

 WKBReader (geom::GeometryFactory const &f)
 
 WKBReader ()
 Inizialize parser with default GeometryFactory. More...
 
std::unique_ptr< geom::Geometryread (std::istream &is)
 Reads a Geometry from an istream. 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...
 

Private Member Functions

std::unique_ptr< geom::GeometryreadGeometry ()
 
std::unique_ptr< geom::PointreadPoint ()
 
std::unique_ptr< geom::LineStringreadLineString ()
 
std::unique_ptr< geom::LinearRingreadLinearRing ()
 
std::unique_ptr< geom::PolygonreadPolygon ()
 
std::unique_ptr< geom::MultiPointreadMultiPoint ()
 
std::unique_ptr< geom::MultiLineStringreadMultiLineString ()
 
std::unique_ptr< geom::MultiPolygonreadMultiPolygon ()
 
std::unique_ptr< geom::GeometryCollectionreadGeometryCollection ()
 
std::unique_ptr< geom::CoordinateSequencereadCoordinateSequence (int)
 
void readCoordinate ()
 
 WKBReader (const WKBReader &other)=delete
 
WKBReaderoperator= (const WKBReader &rhs)=delete
 

Private Attributes

const geom::GeometryFactoryfactory
 
unsigned int inputDimension
 
bool hasZ
 
bool hasM
 
ByteOrderDataInStream dis
 
std::array< double, 4 > ordValues
 

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.

Definition at line 80 of file WKBReader.h.

Constructor & Destructor Documentation

geos::io::WKBReader::WKBReader ( geom::GeometryFactory const &  f)
geos::io::WKBReader::WKBReader ( )

Inizialize parser with default GeometryFactory.

geos::io::WKBReader::WKBReader ( const WKBReader other)
privatedelete

Member Function Documentation

WKBReader& geos::io::WKBReader::operator= ( const WKBReader rhs)
privatedelete
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
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
void geos::io::WKBReader::readCoordinate ( )
private
std::unique_ptr<geom::CoordinateSequence> geos::io::WKBReader::readCoordinateSequence ( int  )
private
std::unique_ptr<geom::Geometry> geos::io::WKBReader::readGeometry ( )
private
std::unique_ptr<geom::GeometryCollection> geos::io::WKBReader::readGeometryCollection ( )
private
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
std::unique_ptr<geom::LinearRing> geos::io::WKBReader::readLinearRing ( )
private
std::unique_ptr<geom::LineString> geos::io::WKBReader::readLineString ( )
private
std::unique_ptr<geom::MultiLineString> geos::io::WKBReader::readMultiLineString ( )
private
std::unique_ptr<geom::MultiPoint> geos::io::WKBReader::readMultiPoint ( )
private
std::unique_ptr<geom::MultiPolygon> geos::io::WKBReader::readMultiPolygon ( )
private
std::unique_ptr<geom::Point> geos::io::WKBReader::readPoint ( )
private
std::unique_ptr<geom::Polygon> geos::io::WKBReader::readPolygon ( )
private

Member Data Documentation

ByteOrderDataInStream geos::io::WKBReader::dis
private

Definition at line 126 of file WKBReader.h.

const geom::GeometryFactory& geos::io::WKBReader::factory
private

Definition at line 119 of file WKBReader.h.

bool geos::io::WKBReader::hasM
private

Definition at line 124 of file WKBReader.h.

bool geos::io::WKBReader::hasZ
private

Definition at line 123 of file WKBReader.h.

unsigned int geos::io::WKBReader::inputDimension
private

Definition at line 122 of file WKBReader.h.

std::array<double, 4> geos::io::WKBReader::ordValues
private

Definition at line 128 of file WKBReader.h.


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