Skip to content

Commit

Permalink
geocoding: enable timetable only mode, respect geocoding flags
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Nov 27, 2024
1 parent 2b0de49 commit dbdc9ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/import.cc
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ data import(config const& c, fs::path const& data_path, bool const write) {

auto adr_extend = task{
"adr_extend",
[&]() { return c.timetable_.has_value(); },
[&]() {
return c.timetable_.has_value() &&
(c.geocoding_ || c.reverse_geocoding_);
},
[&]() { return d.tt_.get() != nullptr; },
[&]() {
auto const area_db = d.t_ ? (std::optional<adr::area_database>{
Expand All @@ -322,6 +325,8 @@ data import(config const& c, fs::path const& data_path, bool const write) {
}
adr_extend_tt(*d.tt_, area_db.has_value() ? &*area_db : nullptr, *d.t_);
if (write) {
auto ec = std::error_code{};
std::filesystem::create_directories(data_path / "adr", ec);
cista::write(data_path / "adr" / "t_ext.bin", *d.t_);
}
d.r_.reset();
Expand Down

0 comments on commit dbdc9ce

Please sign in to comment.