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

`Features.within` doesn't terminate in some cases #58

Open osmuser63783 opened 2 months ago

osmuser63783 commented 2 months ago

Try this:

my_water = next(w for w in planet_240617("a[natural=water]") if w.id == 17140040)
islands = planet_240617("a[place=island,islet]").ways
islands_in_water = islands.within(my_water)

The function seems to run forever and never return.

The culprit is an invalid multipolygon relation (only a node as a member) that should arguably never have been returned when I called ("a[natural=water]").

Screenshot 2024-06-23 at 17 46 35
clarisma commented 2 months ago

Thanks for catching this!

Invalid multipolygon relations are currently responsible for several issues (#29, #30, clarisma/geodesk#52) -- gol build should remove (or fix) them, we'll address this in clarisma/gol-tool#109, which should be part of the next release of the GOL Tool.