-
Notifications
You must be signed in to change notification settings - Fork 18
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
dedicated handling of touching inner rings in multipoygons #249
Conversation
The previous workaround of using `buffer(0)` to let JTS join any touching inner rings can be very slow, up to the point of potentially bringing a query to an almost complete halt when it has to be called on very large multipolygons (e.g. relation 1205151). This adds dedicated handling of touching inner rings, and merges them before the geometry object is created. A few test cases were adjusted, because the new handling is following more strictly the multipolygon validity rules given in the osm wiki. Also includes some minor code cleanup (e.g. adding of a private construtor to the static geometry builder utility class to hide the implicit public constructor).
da3ffbe
to
48f0b98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some open points need to be considered, mostly questions or suggestions.
...gspatialdata/oshdb/util/geometry/osmtestdata/OSHDBGeometryBuilderTestOsmTestData7xxTest.java
Outdated
Show resolved
Hide resolved
...gspatialdata/oshdb/util/geometry/osmtestdata/OSHDBGeometryBuilderTestOsmTestData7xxTest.java
Outdated
Show resolved
Hide resolved
...gspatialdata/oshdb/util/geometry/osmtestdata/OSHDBGeometryBuilderTestOsmTestData7xxTest.java
Outdated
Show resolved
Hide resolved
...gspatialdata/oshdb/util/geometry/osmtestdata/OSHDBGeometryBuilderTestOsmTestData7xxTest.java
Show resolved
Hide resolved
...b-util/src/main/java/org/heigit/bigspatialdata/oshdb/util/geometry/OSHDBGeometryBuilder.java
Show resolved
Hide resolved
...b-util/src/main/java/org/heigit/bigspatialdata/oshdb/util/geometry/OSHDBGeometryBuilder.java
Show resolved
Hide resolved
...gspatialdata/oshdb/util/geometry/osmtestdata/OSHDBGeometryBuilderTestOsmTestData7xxTest.java
Show resolved
Hide resolved
@tyrasd I checked all finished points of your checklist above. Can you think about whether we need to do the remaining ones (benchmarks, changelog, examples, documentation) |
Co-authored-by: Johannes Visintini <johannes.visintini@heigit.org>
I would definitely add this to the changelog. additional benchmarks would be nice, but let's see if we find time for that. documentation/examples are probably not needed, since the API stayed the same. |
also refactor some parts of the code to make it slightly more readable (hopefully).
The previous workaround of using
buffer(0)
to let JTS join any touching inner rings can be very slow, up to the point of potentially bringing a query to an almost complete halt when it has to be called on very large multipolygons (e.g.relation/1205151
).This adds dedicated handling of touching inner rings, and merges them before the geometry object is created.
A few test cases were adjusted, because the new handling is following more strictly the multipolygon validity rules given in the osm wiki. (related: #123, #129)
Also includes some minor code cleanup (e.g. adding of a private construtor to the static geometry builder utility class to hide the implicit public constructor).
Checklist