94 void setFixStructure(
bool doFixStructure);
104 std::unique_ptr<geom::Geometry>
read(std::istream& is);
115 std::unique_ptr<geom::Geometry>
read(
const unsigned char* buf,
size_t size);
125 std::unique_ptr<geom::Geometry>
readHEX(std::istream& is);
135 std::unique_ptr<geom::Geometry>
readHEX(
const std::string& hex);
143 static std::ostream&
printHEX(std::istream& is, std::ostream& os);
150 unsigned int inputDimension;
157 std::array<double, 4> ordValues;
161 std::unique_ptr<geom::Geometry> readGeometry();
163 std::unique_ptr<geom::Point> readPoint();
165 std::unique_ptr<geom::LineString> readLineString();
167 std::unique_ptr<geom::LinearRing> readLinearRing();
169 std::unique_ptr<geom::CircularString> readCircularString();
171 std::unique_ptr<geom::CompoundCurve> readCompoundCurve();
173 std::unique_ptr<geom::Polygon> readPolygon();
175 std::unique_ptr<geom::CurvePolygon> readCurvePolygon();
177 std::unique_ptr<geom::MultiPoint> readMultiPoint();
179 std::unique_ptr<geom::MultiLineString> readMultiLineString();
181 std::unique_ptr<geom::MultiCurve> readMultiCurve();
183 std::unique_ptr<geom::MultiPolygon> readMultiPolygon();
185 std::unique_ptr<geom::MultiSurface> readMultiSurface();
187 std::unique_ptr<geom::GeometryCollection> readGeometryCollection();
189 std::unique_ptr<geom::CoordinateSequence> readCoordinateSequence(
unsigned int);
193 void readCoordinate();
196 std::unique_ptr<T> readChild()
198 auto g = readGeometry();
199 if (
dynamic_cast<const T*
>(g.get())) {
200 return std::unique_ptr<T>(
static_cast<T*
>(g.release()));
202 throw io::ParseException(std::string(
"Expected ") + geom::GeometryTypeName<T>::name +
" but got " + g->getGeometryType());
206 WKBReader(
const WKBReader& other) =
delete;
207 WKBReader& operator=(
const WKBReader& rhs) =
delete;