@@ -31,9 +31,7 @@ osmdata_t::osmdata_t(std::shared_ptr<middle_t> mid,
3131: m_mid(std::move(mid)), m_output(std::move(output)),
3232 m_connection_params (options.connection_params), m_bbox(options.bbox),
3333 m_num_procs(options.num_procs), m_append(options.append),
34- m_droptemp(options.droptemp),
35- m_with_extra_attrs(options.extra_attributes ||
36- options.output_backend == " flex" )
34+ m_droptemp(options.droptemp)
3735{
3836 assert (m_mid);
3937 assert (m_output);
@@ -60,13 +58,8 @@ void osmdata_t::node(osmium::Node const &node)
6058 return ;
6159 }
6260
63- bool const has_tags_or_attrs = m_with_extra_attrs || !node.tags ().empty ();
6461 if (m_append) {
65- if (has_tags_or_attrs) {
66- m_output->node_modify (node);
67- } else {
68- m_output->node_delete (node.id ());
69- }
62+ m_output->node_modify (node);
7063
7164 // Version 1 means this is a new node, so there can't be an existing
7265 // way or relation referencing it, so we don't have to add that node
@@ -75,7 +68,7 @@ void osmdata_t::node(osmium::Node const &node)
7568 if (node.version () != 1 ) {
7669 m_changed_nodes.push_back (node.id ());
7770 }
78- } else if (has_tags_or_attrs) {
71+ } else {
7972 m_output->node_add (node);
8073 }
8174}
@@ -105,13 +98,8 @@ void osmdata_t::way(osmium::Way &way)
10598 return ;
10699 }
107100
108- bool const has_tags_or_attrs = m_with_extra_attrs || !way.tags ().empty ();
109101 if (m_append) {
110- if (has_tags_or_attrs) {
111- m_output->way_modify (&way);
112- } else {
113- m_output->way_delete (way.id ());
114- }
102+ m_output->way_modify (&way);
115103
116104 // Version 1 means this is a new way, so there can't be an existing
117105 // relation referencing it, so we don't have to add that way to the
@@ -120,7 +108,7 @@ void osmdata_t::way(osmium::Way &way)
120108 if (way.version () != 1 ) {
121109 m_changed_ways.push_back (way.id ());
122110 }
123- } else if (has_tags_or_attrs) {
111+ } else {
124112 m_output->way_add (&way);
125113 }
126114}
@@ -177,15 +165,10 @@ void osmdata_t::relation(osmium::Relation const &rel)
177165 return ;
178166 }
179167
180- bool const has_tags_or_attrs = m_with_extra_attrs || !rel.tags ().empty ();
181168 if (m_append) {
182- if (has_tags_or_attrs) {
183- m_output->relation_modify (rel);
184- } else {
185- m_output->relation_delete (rel.id ());
186- }
169+ m_output->relation_modify (rel);
187170 m_changed_relations.push_back (rel.id ());
188- } else if (has_tags_or_attrs) {
171+ } else {
189172 m_output->relation_add (rel);
190173 }
191174}
0 commit comments