Skip to content

Simplify osmdata_t class #2271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions src/osmdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,16 @@ void osmdata_t::process_dependents()
proc.process_relations_stage1c(std::move(rels_pending_tracker));
}

void osmdata_t::reprocess_marked() const { m_output->reprocess_marked(); }

void osmdata_t::postprocess_database() const
void osmdata_t::stop()
{
if (m_append) {
process_dependents();
}

// Run stage 2 processing: Reprocess objects marked in stage 1 (if any).
m_output->reprocess_marked();

// Run postprocessing on database: Clustering and index creation.
m_output->free_middle_references();

if (m_droptemp) {
Expand All @@ -458,14 +464,3 @@ void osmdata_t::postprocess_database() const
m_mid->wait();
m_output->wait();
}

void osmdata_t::stop()
{
if (m_append) {
process_dependents();
}

reprocess_marked();

postprocess_database();
}
10 changes: 0 additions & 10 deletions src/osmdata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ class osmdata_t : public osmium::handler::Handler
*/
void process_dependents();

/**
* Run stage 2 processing: Reprocess objects marked in stage 1 (if any).
*/
void reprocess_marked() const;

/**
* Run postprocessing on database: Clustering and index creation.
*/
void postprocess_database() const;

/**
* In append mode all new and changed nodes will be added to this. After
* all nodes are read this is used to figure out which parent ways and
Expand Down