-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c961ad2
commit 6803ee1
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#include <mapbox/geometry/point.hpp> | ||
#include <mapbox/geometry/line_string.hpp> | ||
#include <mapbox/geometry/polygon.hpp> | ||
#include <mapbox/geometry/multi_point.hpp> | ||
#include <mapbox/geometry/multi_line_string.hpp> | ||
#include <mapbox/geometry/multi_polygon.hpp> | ||
#include <mapbox/geometry/geometry.hpp> | ||
#include <mapbox/geometry/feature.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#include <mapbox/geometry/geometry.hpp> | ||
|
||
#include <mapbox/variant.hpp> | ||
|
||
#include <cstdint> | ||
#include <string> | ||
#include <unordered_map> | ||
|
||
namespace mapbox { namespace geometry { | ||
|
||
using value = mapbox::util::variant<bool, int64_t, uint64_t, double, std::string>; | ||
|
||
template <class T> | ||
struct feature | ||
{ | ||
using geometry_type = geometry<T>; | ||
using property_map = std::unordered_map<std::string, value>; | ||
|
||
geometry_type geometry; | ||
property_map properties; | ||
}; | ||
|
||
template <class T, template <typename...> class Cont = std::vector> | ||
struct feature_collection : Cont<feature<T>> | ||
{ | ||
using feature_type = feature<T>; | ||
using container_type = Cont<feature_type>; | ||
using container_type::container_type; | ||
}; | ||
|
||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters