clarisma / geodesk

Fast and storage-efficient spatial database engine for OpenStreetMap data
https://docs.geodesk.com/java
Apache License 2.0
137 stars 4 forks source link

Retain orphan nodes #73

Closed clarisma closed 1 year ago

clarisma commented 1 year ago

Currently, any nodes that have no tags and aren't referenced by any ways or relations are discarded.

In the context of updating, retaining these otherwise useless nodes may become important. New or modified ways may reference these orphan nodes, but since they are neither features nor incorporated into ways as anonymous nodes, we have no way of knowing their location.

Since updates are non-transactional, it is also possible that new nodes could be included in one .osc file, while a way referencing them may arrive in a subsequent .osc file.

To avoid this problem, orphan nodes should be upgraded to feature nodes (at least until they are referenced by a way) by tagging them with geodesk:orphan=true. This would have the added benefit of allowing QA tools to query them (a[geodesk:orphan]).