From cc6d94e302a99b9ed8dba15caea9cf0123745d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Mon, 4 Nov 2024 00:55:43 +0100 Subject: [PATCH] wip --- include/motis/config.h | 4 ---- include/motis/hashes.h | 2 +- src/config.cc | 3 ++- src/import.cc | 12 ++++++++++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/motis/config.h b/include/motis/config.h index c4fd82989..3cd70600d 100644 --- a/include/motis/config.h +++ b/include/motis/config.h @@ -125,7 +125,3 @@ struct config { }; } // namespace motis - -#include "cista/reflection/to_tuple.h" - -static_assert(std::is_aggregate_v); diff --git a/include/motis/hashes.h b/include/motis/hashes.h index 41c32b559..a4ac8a158 100644 --- a/include/motis/hashes.h +++ b/include/motis/hashes.h @@ -14,7 +14,7 @@ constexpr auto const osr_version = []() { return meta_entry_t{"osr_bin_ver", 6U}; }; constexpr auto const adr_version = []() { - return meta_entry_t{"adr_bin_ver", 1U}; + return meta_entry_t{"adr_bin_ver", 2U}; }; constexpr auto const n_version = []() { return meta_entry_t{"nigiri_bin_ver", 6U}; diff --git a/src/config.cc b/src/config.cc index 666a9672f..cfe6fc02a 100644 --- a/src/config.cc +++ b/src/config.cc @@ -65,6 +65,7 @@ config config::read_simple(std::vector const& args) { c.osm_ = p; c.street_routing_ = true; c.geocoding_ = true; + c.reverse_geocoding_ = true; c.tiles_ = {config::tiles{.profile_ = "tiles-profiles/full.lua"}}; } else { if (!c.timetable_.has_value()) { @@ -399,7 +400,7 @@ config config::read_legacy(fs::path const& p) { : std::nullopt; c.street_routing_ = is_module_active("osr") || is_module_active("osrm") || is_module_active("ppr"); - c.geocoding_ = is_module_active("adr"); + c.geocoding_ = c.reverse_geocoding_ = is_module_active("adr"); c.tiles_ = is_module_active("tiles") ? std::optional{tiles{.profile_ = cfg.profile_path_, diff --git a/src/import.cc b/src/import.cc index d06daa715..9109b0c2b 100644 --- a/src/import.cc +++ b/src/import.cc @@ -206,7 +206,10 @@ data import(config const& c, fs::path const& data_path, bool const write) { d.load_reverse_geocoder(); } }, - {osm_hash, adr_version()}}; + {osm_hash, + adr_version(), + {"geocoding", c.geocoding_}, + {"reverse_geocoding", c.reverse_geocoding_}}}; auto tt = task{ "tt", @@ -322,7 +325,12 @@ data import(config const& c, fs::path const& data_path, bool const write) { } }, [&]() { d.load_geocoder(); }, - {tt_hash, osm_hash, adr_version(), n_version()}}; + {tt_hash, + osm_hash, + adr_version(), + n_version(), + {"geocoding", c.geocoding_}, + {"reverse_geocoding", c.reverse_geocoding_}}}; auto osr_footpath = task{ "osr_footpath",