Skip to content

Commit

Permalink
Merge pull request #2271 from joto/refactor-osmdata
Browse files Browse the repository at this point in the history
Simplify osmdata_t class
  • Loading branch information
lonvia authored Nov 30, 2024
2 parents acb840a + 0a31043 commit dca6932
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
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

0 comments on commit dca6932

Please sign in to comment.