22#include <geos/export.h>
24#include <geos/io/ByteOrderDataInStream.h>
31#define BAD_GEOM_TYPE_MSG "Bad geometry type encountered in"
35#pragma warning(disable: 4251)
79class GEOS_DLL WKBReader {
88 void setFixStructure(
bool doFixStructure);
98 std::unique_ptr<geom::Geometry>
read(std::istream& is);
109 std::unique_ptr<geom::Geometry>
read(
const unsigned char* buf,
size_t size);
119 std::unique_ptr<geom::Geometry>
readHEX(std::istream& is);
127 static std::ostream&
printHEX(std::istream& is, std::ostream& os);
134 unsigned int inputDimension;
141 std::array<double, 4> ordValues;
143 std::unique_ptr<geom::Geometry> readGeometry();
145 std::unique_ptr<geom::Point> readPoint();
147 std::unique_ptr<geom::LineString> readLineString();
149 std::unique_ptr<geom::LinearRing> readLinearRing();
151 std::unique_ptr<geom::Polygon> readPolygon();
153 std::unique_ptr<geom::MultiPoint> readMultiPoint();
155 std::unique_ptr<geom::MultiLineString> readMultiLineString();
157 std::unique_ptr<geom::MultiPolygon> readMultiPolygon();
159 std::unique_ptr<geom::GeometryCollection> readGeometryCollection();
161 std::unique_ptr<geom::CoordinateSequence> readCoordinateSequence(
unsigned int);
163 void minMemSize(
int geomType, uint64_t size);
165 void readCoordinate();
168 WKBReader(
const WKBReader& other) =
delete;
169 WKBReader& operator=(
const WKBReader& rhs) =
delete;
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:216
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:65
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:186
Definition LineString.h:65
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
Models a collection of LineStrings.
Definition MultiLineString.h:49
Definition MultiPoint.h:50
Definition MultiPolygon.h:58
Represents a linear polygon, which may include holes.
Definition Polygon.h:60
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:88
Allows reading an stream of primitive datatypes from an underlying istream, with the representation b...
Definition ByteOrderDataInStream.h:40
static std::ostream & printHEX(std::istream &is, std::ostream &os)
Print WKB in HEX form to out stream.
WKBReader()
Inizialize parser with default GeometryFactory.
std::unique_ptr< geom::Geometry > read(const unsigned char *buf, size_t size)
Reads a Geometry from a buffer.
std::unique_ptr< geom::Geometry > readHEX(std::istream &is)
Reads a Geometry from an istream in hex format.
std::unique_ptr< geom::Geometry > read(std::istream &is)
Reads a Geometry from an istream.
Contains the interfaces for converting JTS objects to and from other formats.
Definition Geometry.h:64
Basic namespace for all GEOS functionalities.
Definition geos.h:39