#ifndef OSRM_LOCATION_DEPENDENT_DATA_HPP #define OSRM_LOCATION_DEPENDENT_DATA_HPP #include #include #include #include #include #include #include namespace osrm { namespace extractor { struct LocationDependentData { using point_t = boost::geometry::model::d2:: point_xy>; using segment_t = boost::geometry::model::segment; using polygon_t = boost::geometry::model::polygon; using polygon_bands_t = std::vector>; using box_t = boost::geometry::model::box; using polygon_position_t = std::size_t; using rtree_t = boost::geometry::index::rtree, boost::geometry::index::rstar<8>>; using property_t = boost::variant; using properties_t = std::unordered_map; LocationDependentData(const boost::filesystem::path &path); LocationDependentData(const std::vector &file_paths); bool empty() const { return rtree.empty(); } properties_t operator()(const point_t &point) const; properties_t operator()(const osmium::Way &way) const; private: void loadLocationDependentData(const boost::filesystem::path &file_path); rtree_t rtree; std::vector> polygons; std::vector properties; }; } } #endif