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;
159 std::unique_ptr<geom::Geometry> readGeometry();
161 std::unique_ptr<geom::Point> readPoint();
163 std::unique_ptr<geom::LineString> readLineString();
165 std::unique_ptr<geom::LinearRing> readLinearRing();
167 std::unique_ptr<geom::CircularString> readCircularString();
169 std::unique_ptr<geom::CompoundCurve> readCompoundCurve();
171 std::unique_ptr<geom::Polygon> readPolygon();
173 std::unique_ptr<geom::CurvePolygon> readCurvePolygon();
175 std::unique_ptr<geom::MultiPoint> readMultiPoint();
177 std::unique_ptr<geom::MultiLineString> readMultiLineString();
179 std::unique_ptr<geom::MultiCurve> readMultiCurve();
181 std::unique_ptr<geom::MultiPolygon> readMultiPolygon();
183 std::unique_ptr<geom::MultiSurface> readMultiSurface();
185 std::unique_ptr<geom::GeometryCollection> readGeometryCollection();
187 std::unique_ptr<geom::CoordinateSequence> readCoordinateSequence(
unsigned int);
191 void readCoordinate();
194 std::unique_ptr<T> readChild()
196 auto g = readGeometry();
197 if (
dynamic_cast<const T*
>(g.get())) {
198 return std::unique_ptr<T>(
static_cast<T*
>(g.release()));
200 throw io::ParseException(std::string(
"Expected ") + geom::GeometryTypeName<T>::name +
" but got " + g->getGeometryType());
204 WKBReader(
const WKBReader& other) =
delete;
205 WKBReader& operator=(
const WKBReader& rhs) =
delete;