15 #ifndef GEOS_IO_GEOJSONREADER_H
16 #define GEOS_IO_GEOJSONREADER_H
18 #include <geos/export.h>
20 #include <geos/io/GeoJSON.h>
21 #include <geos/geom/GeometryFactory.h>
22 #include <geos/geom/CoordinateSequence.h>
23 #include <geos/geom/Geometry.h>
25 #include "geos/vend/include_nlohmann_json.hpp"
31 class GeometryCollection;
37 class MultiLineString;
72 std::unique_ptr<geom::Geometry>
read(
const std::string& geoJsonText)
const;
74 GeoJSONFeatureCollection readFeatures(
const std::string& geoJsonText)
const;
80 std::unique_ptr<geom::Geometry> readFeatureForGeometry(
const geos_nlohmann::json& j)
const;
82 GeoJSONFeature readFeature(
const geos_nlohmann::json& j)
const;
84 std::map<std::string, GeoJSONValue> readProperties(
const geos_nlohmann::json& p)
const;
86 GeoJSONValue readProperty(
const geos_nlohmann::json& p)
const;
88 std::unique_ptr<geom::Geometry> readFeatureCollectionForGeometry(
89 const geos_nlohmann::json& j)
const;
91 GeoJSONFeatureCollection readFeatureCollection(
92 const geos_nlohmann::json& j)
const;
94 std::unique_ptr<geom::Geometry> readGeometry(
95 const geos_nlohmann::json& j)
const;
97 std::unique_ptr<geom::Point> readPoint(
const geos_nlohmann::json& j)
const;
101 std::unique_ptr<geom::LineString> readLineString(
102 const geos_nlohmann::json& j)
const;
104 std::unique_ptr<geom::Polygon> readPolygon(
105 const geos_nlohmann::json& j)
const;
107 std::unique_ptr<geom::Polygon> readPolygon(
108 const std::vector<std::vector<std::vector<double>>>& c)
const;
110 std::unique_ptr<geom::MultiPoint> readMultiPoint(
111 const geos_nlohmann::json& j)
const;
113 std::unique_ptr<geom::MultiLineString> readMultiLineString(
114 const geos_nlohmann::json& j)
const;
116 std::unique_ptr<geom::MultiPolygon> readMultiPolygon(
117 const geos_nlohmann::json& j)
const;
119 std::unique_ptr<geom::GeometryCollection> readGeometryCollection(
120 const geos_nlohmann::json& j)
const;
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
GeoJSON reader class; see also GeoJSONWriter.
Definition: GeoJSONReader.h:50
GeoJSONReader(const geom::GeometryFactory &gf)
Inizialize parser with given GeometryFactory.
GeoJSONReader()
Inizialize parser with default GeometryFactory.
std::unique_ptr< geom::Geometry > read(const std::string &geoJsonText) const
Parse a GeoJSON string returning a Geometry.
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26