@@ -67,47 +67,16 @@ void output_multi_t::start()
6767
6868bool output_multi_t::has_pending () const
6969{
70- return !ways_pending_tracker. empty () || ! rels_pending_tracker.empty ();
70+ return !rels_pending_tracker.empty ();
7171}
7272
7373void output_multi_t::enqueue_ways (pending_queue_t &job_queue, osmid_t id,
7474 size_t output_id, size_t &added)
7575{
76- osmid_t const prev = ways_pending_tracker.last_returned ();
77- if (id_tracker::is_valid (prev) && prev >= id) {
78- if (prev > id) {
79- job_queue.push (pending_job_t (id, output_id));
80- }
81- // already done the job
82- return ;
83- }
84-
85- // make sure we get the one passed in
8676 if (id_tracker::is_valid (id)) {
87- job_queue.push ( pending_job_t ( id, output_id) );
77+ job_queue.emplace ( id, output_id);
8878 ++added;
8979 }
90-
91- // grab the first one or bail if its not valid
92- osmid_t popped = ways_pending_tracker.pop_mark ();
93- if (!id_tracker::is_valid (popped)) {
94- return ;
95- }
96-
97- // get all the ones up to the id that was passed in
98- while (popped < id) {
99- job_queue.push (pending_job_t (popped, output_id));
100- ++added;
101- popped = ways_pending_tracker.pop_mark ();
102- }
103-
104- // make sure to get this one as well and move to the next
105- if (popped > id) {
106- if (id_tracker::is_valid (popped)) {
107- job_queue.push (pending_job_t (popped, output_id));
108- ++added;
109- }
110- }
11180}
11281
11382void output_multi_t::pending_way (osmid_t id, int exists)
@@ -324,15 +293,7 @@ void output_multi_t::process_way(osmium::Way *way)
324293 auto const geom = m_processor->process_way (*way, &m_builder);
325294
326295 if (!geom.empty ()) {
327- // if we are also interested in relations we need to mark
328- // this way pending just in case it shows up in one
329- if (m_processor->interests (geometry_processor::interest_relation)) {
330- ways_pending_tracker.mark (way->id ());
331- } else {
332- // We wouldn't be interested in this as a relation, so no need to mark it pending.
333- // TODO: Does this imply anything for non-multipolygon relations?
334- copy_to_table (way->id (), geom, outtags);
335- }
296+ copy_to_table (way->id (), geom, outtags);
336297 }
337298 }
338299}
0 commit comments