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(GeoJSONFeature
const& other);
103 GeoJSONFeature(GeoJSONFeature&& other);
105 GeoJSONFeature& operator=(
const GeoJSONFeature&);
107 GeoJSONFeature& operator=(GeoJSONFeature&&);
109 const geom::Geometry* getGeometry()
const;
111 const std::map<std::string, GeoJSONValue>& getProperties()
const;
115 std::unique_ptr<geom::Geometry> geometry;
117 std::map<std::string, GeoJSONValue> properties;
121class GEOS_DLL GeoJSONFeatureCollection {
125 GeoJSONFeatureCollection(
const std::vector<GeoJSONFeature>& f);
127 GeoJSONFeatureCollection(std::vector<GeoJSONFeature>&& f);
129 const std::vector<GeoJSONFeature>& getFeatures()
const;
133 std::vector<GeoJSONFeature> features;
Basic namespace for all GEOS functionalities.
Definition: geos.h:39