clarisma / geodesk-py

Fast and storage-efficient spatial database engine for OpenStreetMap data
https://docs.geodesk.com/python
GNU Lesser General Public License v3.0
36 stars 0 forks source link

Segfault when trying to access `.nodes` of relation #51

Closed osmuser63783 closed 1 month ago

osmuser63783 commented 6 months ago

... or at least that's what I think is going on.

traffic_sign_nodes_on_non_highways = set()
for h in planet_240219("aw[!highway]"):
    print(h)
    traffic_sign_nodes_on_non_highways.update(h.nodes("n[traffic_sign]"))
... 
way/120993860
way/120992621
way/120993742
way/986571987
way/120992739
way/120993191
relation/1655222
Segmentation fault (core dumped)

That's what I get for forgetting to do .ways.

It would be nice to fail more gracefully :-) (not sure if the method should return an empty set in case of an area, or all the nodes that define the multipolygon...)

clarisma commented 6 months ago

FYI -- your query aw[!highway] may also be effected by this bug: #52 ; fix coming soon.

However, unable to reproduce the segfault. Tried in both Ubunu 22.04 and Windows 10, with planet-wide GOLs built with GOL Tool pre and post v0.1.9.

Does the segfault appear consistently at relation/1655222? Does the query fail if applied to other relations?

clarisma commented 6 months ago

Regarding nodes of relations, please see #54

osmuser63783 commented 1 month ago

I have not been able to reproduce this recently so I am closing this issue. Sorry for the false positive!