-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throw OSM feature IDs in error logs when complex geometries are behaving recursive #309
Comments
The Osmium library has a facility for reporting problems with multipolygons. This facility isn't necessarily used in all programs using the library, because it will produce huge amounts of debug info that nobody wants to have clutter up their system. You can use the The underlying problem ist this: When Osmium encounters a complex multipolygon, i.e. one where the boundary touches itself, it will switch from a simple algorithm which can't handle the complex case to a different algorithm that will handle any case but has exponential complexity. Basically it will try all combinations of assembling the boundary. This is done with a recursive algorithm and that's where the recursion limit comes from that I not added as a stopgap mechanism. When I wrote all of this many years ago, I decided that this approach, while not being perfect, was okay, because there are very few multipolygons that even need this more expensive approach and I couldn't imagine there ever being something like In light of recent development it seems we have to revisit this decision from many years ago and try to find a better algorithm. Until we do, the workaround keeps very very few multipolygons from breaking Osmium but it also means they are not rendered on the map. At the moment it doesn't make sense to "fix" |
thanks. appreciate the explanation @joto |
https://www.openstreetmap.org/relation/11245090/history
Request so that we can debug and maybe fix the geometry complication on OSM with osmiumid
r11245090
libosmium v2.15.5 was unable to parse V4 of https://www.openstreetmap.org/relation/11245090/history. It would be good if the failure is more verbose. Many downstream teams are familiar with OpenStreetMap data and can debug and fix on OSM quickly. I am not sure how to best log that from libosmium itself but would be nice to have.
@joto could you also explain the recursion limit in 1 or 2 sentences.
ae64970
The text was updated successfully, but these errors were encountered: