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);
133 static std::ostream&
printHEX(std::istream& is, std::ostream& os);
140 unsigned int inputDimension;
147 std::array<double, 4> ordValues;
149 std::unique_ptr<geom::Geometry> readGeometry();
151 std::unique_ptr<geom::Point> readPoint();
153 std::unique_ptr<geom::LineString> readLineString();
155 std::unique_ptr<geom::LinearRing> readLinearRing();
157 std::unique_ptr<geom::CircularString> readCircularString();
159 std::unique_ptr<geom::CompoundCurve> readCompoundCurve();
161 std::unique_ptr<geom::Polygon> readPolygon();
163 std::unique_ptr<geom::CurvePolygon> readCurvePolygon();
165 std::unique_ptr<geom::MultiPoint> readMultiPoint();
167 std::unique_ptr<geom::MultiLineString> readMultiLineString();
169 std::unique_ptr<geom::MultiCurve> readMultiCurve();
171 std::unique_ptr<geom::MultiPolygon> readMultiPolygon();
173 std::unique_ptr<geom::MultiSurface> readMultiSurface();
175 std::unique_ptr<geom::GeometryCollection> readGeometryCollection();
177 std::unique_ptr<geom::CoordinateSequence> readCoordinateSequence(
unsigned int);
181 void readCoordinate();
184 std::unique_ptr<T> readChild()
186 auto g = readGeometry();
187 if (
dynamic_cast<const T*
>(g.get())) {
188 return std::unique_ptr<T>(
static_cast<T*
>(g.release()));
190 throw io::ParseException(std::string(
"Expected ") + geom::GeometryTypeName<T>::name +
" but got " + g->getGeometryType());
194 WKBReader(
const WKBReader& other) =
delete;
195 WKBReader& operator=(
const WKBReader& rhs) =
delete;