OSMExpress
OSMExpress copied to clipboard
Crash when querying tagless nodes
When looking up a node such 6058479131, which has only coordinates but no tags, the osmx query tool currently crashes:
$ curl https://osmx1.protomaps.com/results/b1bbdd89-12e6-4390-b9a2-42a54fc65948.osm.pbf >sample.osm.pbf
$ ./osmx expand sample.osm.pbf sample.osmx
$ ./osmx query sample.osmx node 6058479131
(7.4311092,46.9522392)
MDB_NOTFOUND: No matching key/data pair found, file /Users/sascha/src/OSMExpress/src/storage.cpp, line 74.
Abort trap: 6
I think this is just a CLI UI issue and not an underlying data problem - it should be fine for a node ID to exist in the Locations db and not in the Nodes db, that means it has no tags, so check for existence in Nodes and ignore if not found. PR would be welcome!