17#include <geos/export.h>
25#include <geos/geom/Geometry.h>
29#pragma warning(disable: 4251)
41class GEOS_DLL GeoJSONValue {
45 enum class Type { NUMBER, STRING, NULLTYPE, BOOLEAN, OBJECT, ARRAY };
54 std::map<std::string, GeoJSONValue> o;
55 std::vector<GeoJSONValue> a;
62 struct GeoJSONTypeError {};
65 GeoJSONValue(
const std::string&);
68 GeoJSONValue(
const std::map<std::string, GeoJSONValue>&);
69 GeoJSONValue(
const std::vector<GeoJSONValue>&);
72 GeoJSONValue(
const GeoJSONValue&);
73 GeoJSONValue& operator=(
const GeoJSONValue&);
75 double getNumber()
const;
76 const std::string& getString()
const;
77 std::nullptr_t getNull()
const;
78 bool getBoolean()
const;
79 const std::map<std::string, GeoJSONValue>& getObject()
const;
80 const std::vector<GeoJSONValue>& getArray()
const;
82 bool isNumber()
const;
83 bool isString()
const;
85 bool isBoolean()
const;
86 bool isObject()
const;
91class GEOS_DLL GeoJSONFeature {
95 GeoJSONFeature(std::unique_ptr<geom::Geometry> g,
96 const std::map<std::string, GeoJSONValue>& p);
98 GeoJSONFeature(std::unique_ptr<geom::Geometry> g,
99 std::map<std::string, GeoJSONValue>&& p);
101 GeoJSONFeature(std::unique_ptr<geom::Geometry> g,
102 const std::map<std::string, GeoJSONValue>& p,
103 const std::string&
id);
105 GeoJSONFeature(std::unique_ptr<geom::Geometry> g,
106 std::map<std::string, GeoJSONValue>&& p, std::string
id);
108 GeoJSONFeature(GeoJSONFeature
const& other);
110 GeoJSONFeature(GeoJSONFeature&& other);
112 GeoJSONFeature& operator=(
const GeoJSONFeature&);
114 GeoJSONFeature& operator=(GeoJSONFeature&&);
116 const geom::Geometry* getGeometry()
const;
118 const std::map<std::string, GeoJSONValue>& getProperties()
const;
120 const std::string& getId()
const;
124 std::unique_ptr<geom::Geometry> geometry;
126 std::map<std::string, GeoJSONValue> properties;
132class GEOS_DLL GeoJSONFeatureCollection {
136 GeoJSONFeatureCollection(
const std::vector<GeoJSONFeature>& f);
138 GeoJSONFeatureCollection(std::vector<GeoJSONFeature>&& f);
140 const std::vector<GeoJSONFeature>& getFeatures()
const;
144 std::vector<GeoJSONFeature> features;
Basic namespace for all GEOS functionalities.
Definition geos.h:39