22 #include <geos/export.h> 23 #include <geos/geom/Geometry.h> 24 #include <geos/geom/GeometryTypeName.h> 25 #include <geos/io/ByteOrderDataInStream.h> 34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 41 class GeometryFactory;
48 class GeometryCollection;
55 class MultiLineString;
59 class CoordinateSequence;
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());
Reads a Geometry from Well-Known Binary format.
Definition: WKBReader.h:85
GeometryTypeId
Geometry types.
Definition: Geometry.h:74
Allows reading an stream of primitive datatypes from an underlying istream, with the representation b...
Definition: ByteOrderDataInStream.h:40
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Notifies a parsing error.
Definition: ParseException.h:33
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25