diff options
Diffstat (limited to 'deps/geojson/0.4.2/include/mapbox/geojson.hpp')
-rw-r--r-- | deps/geojson/0.4.2/include/mapbox/geojson.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/deps/geojson/0.4.2/include/mapbox/geojson.hpp b/deps/geojson/0.4.2/include/mapbox/geojson.hpp new file mode 100644 index 0000000000..4b62751e15 --- /dev/null +++ b/deps/geojson/0.4.2/include/mapbox/geojson.hpp @@ -0,0 +1,42 @@ +#pragma once + +#include <mapbox/geometry.hpp> +#include <mapbox/variant.hpp> + +namespace mapbox { +namespace geojson { + +using value = mapbox::geometry::value; +using null_value_t = mapbox::geometry::null_value_t; +using identifier = mapbox::geometry::identifier; +using point = mapbox::geometry::point<double>; +using multi_point = mapbox::geometry::multi_point<double>; +using line_string = mapbox::geometry::line_string<double>; +using linear_ring = mapbox::geometry::linear_ring<double>; +using multi_line_string = mapbox::geometry::multi_line_string<double>; +using polygon = mapbox::geometry::polygon<double>; +using multi_polygon = mapbox::geometry::multi_polygon<double>; +using geometry = mapbox::geometry::geometry<double>; +using geometry_collection = mapbox::geometry::geometry_collection<double>; +using feature = mapbox::geometry::feature<double>; +using feature_collection = mapbox::geometry::feature_collection<double>; + +// Parse inputs of known types. Instantiations are provided for geometry, feature, and +// feature_collection. +template <class T> +T parse(const std::string &); + +// Parse any GeoJSON type. +using geojson = mapbox::util::variant<geometry, feature, feature_collection>; +geojson parse(const std::string &); + +// Stringify inputs of known types. Instantiations are provided for geometry, feature, and +// feature_collection. +template <class T> +std::string stringify(const T &); + +// Stringify any GeoJSON type. +std::string stringify(const geojson &); + +} // namespace geojson +} // namespace mapbox |