Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Nov 3, 2024
1 parent 9ae4b9f commit cc6d94e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 0 additions & 4 deletions include/motis/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,3 @@ struct config {
};

} // namespace motis

#include "cista/reflection/to_tuple.h"

static_assert(std::is_aggregate_v<motis::config::timetable>);
2 changes: 1 addition & 1 deletion include/motis/hashes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
3 changes: 2 additions & 1 deletion src/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ config config::read_simple(std::vector<std::string> 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()) {
Expand Down Expand Up @@ -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_,
Expand Down
12 changes: 10 additions & 2 deletions src/import.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit cc6d94e

Please sign in to comment.