osm2pgsql-dev / osm2pgsql

OpenStreetMap data to PostgreSQL converter
https://osm2pgsql.org
GNU General Public License v2.0
1.5k stars 474 forks source link

New nodes and ways can't have existing parents #2183

Closed joto closed 5 months ago

joto commented 5 months ago

New nodes or ways (ie with version=1) can't have parent ways or relations. So we don't have to add them to the list of "changed nodes" or "changed ways" to trigger re-processing of changed parents. This will save us a whole lot of effort looking for parents that are never there.

Note that we are checking for version != 1. In the (unlikely) case that there are no versions in the input file (making version == 0), everything will work as before.