Allow multiple GeoJSON files
This commit is contained in:
@@ -79,7 +79,7 @@ struct ExtractorConfig final : storage::IOConfig
|
||||
|
||||
boost::filesystem::path input_path;
|
||||
boost::filesystem::path profile_path;
|
||||
boost::filesystem::path location_dependent_data_path;
|
||||
std::vector<boost::filesystem::path> location_dependent_data_paths;
|
||||
|
||||
unsigned requested_num_threads;
|
||||
unsigned small_component_size;
|
||||
|
||||
@@ -30,11 +30,13 @@ 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 &file_path);
|
||||
LocationDependentData(const std::vector<boost::filesystem::path> &file_paths);
|
||||
|
||||
sol::table operator()(sol::state &state, const osmium::Way &way) const;
|
||||
|
||||
private:
|
||||
void loadLocationDependentData(const boost::filesystem::path &file_path);
|
||||
|
||||
rtree_t rtree;
|
||||
std::vector<std::pair<polygon_t, properties_t>> polygons;
|
||||
};
|
||||
|
||||
@@ -68,8 +68,9 @@ class Sol2ScriptingEnvironment final : public ScriptingEnvironment
|
||||
static const constexpr int SUPPORTED_MIN_API_VERSION = 0;
|
||||
static const constexpr int SUPPORTED_MAX_API_VERSION = 3;
|
||||
|
||||
explicit Sol2ScriptingEnvironment(const std::string &file_name,
|
||||
const boost::filesystem::path &location_dependent_data_path);
|
||||
explicit Sol2ScriptingEnvironment(
|
||||
const std::string &file_name,
|
||||
const std::vector<boost::filesystem::path> &location_dependent_data_paths);
|
||||
~Sol2ScriptingEnvironment() override = default;
|
||||
|
||||
const ProfileProperties &GetProfileProperties() override;
|
||||
|
||||
Reference in New Issue
Block a user