Allow multiple GeoJSON files with locations data

This commit is contained in:
Michael Krasnyk
2017-09-22 16:42:00 +02:00
parent 095b345713
commit 476bc347b4
4 changed files with 24 additions and 21 deletions
@@ -32,8 +32,6 @@ struct LocationDependentData
using property_t = boost::variant<boost::blank, double, std::string, bool>;
using properties_t = std::unordered_map<std::string, property_t>;
LocationDependentData(const boost::filesystem::path &path);
LocationDependentData(const std::vector<boost::filesystem::path> &file_paths);
bool empty() const { return rtree.empty(); }
@@ -41,7 +39,8 @@ struct LocationDependentData
property_t operator()(const point_t &point, const char *key) const;
private:
void loadLocationDependentData(const boost::filesystem::path &file_path);
void loadLocationDependentData(const boost::filesystem::path &file_path,
std::vector<rtree_t::value_type> &bounding_boxes);
rtree_t rtree;
std::vector<std::pair<polygon_bands_t, std::size_t>> polygons;