You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The footprintinit application will sometimes create invalid, self-intersecting polygons. The isisminer application detects bad polygons, reports them, and terminates instead of attempting to repair them.
Solution
In many cases, self-intersecting polygons can be repaired by creating a buffer of size 0 around the polygon. This is analogous to stretching a rubber band around all points in the polygon (see slide below). The buffer(0) approach will likely fix many (though possibly not all) self-intersecting polygons. While the fix should be incorporated into footprintinit, it should also be implemented in isisminer.
Additional context
The slide below shows a polygon with a highlighted self-intersection in blue. The self-intersection was repaired (shown in orange) by applying a buffer of 0.1 around all polygon vertices. Note that typically a buffer of size 0 is applied. Here, a buffer of 0.1 was used for illustration purposes only.
The text was updated successfully, but these errors were encountered:
This fix is not directly related to #5553 because GisGeometry uses the GEOS C-API. Code in PolygonTools uses the C++ API so they are separate. We added a buffer() method to GisGeometry.
They are likely related as some GIsFootprints created by ISIS have self-intersections. These leak through into isisminer processing and aborts the run. The fix that @kledmundson is providing runs a buffer( 0 ) on the whole polygon in an attempt to fix them. Most all occurrences are fixed using this technique.
kledmundson
changed the title
Bug in GisGeometry/Strategy classes utilized by isisminer application
Isisminer does not properly handle the presence of bad (e.g. self-intersecting) polygons.
Sep 13, 2024
ISIS version(s) affected: x.y.z
dev
Description
The footprintinit application will sometimes create invalid, self-intersecting polygons. The isisminer application detects bad polygons, reports them, and terminates instead of attempting to repair them.
Solution
In many cases, self-intersecting polygons can be repaired by creating a buffer of size 0 around the polygon. This is analogous to stretching a rubber band around all points in the polygon (see slide below). The buffer(0) approach will likely fix many (though possibly not all) self-intersecting polygons. While the fix should be incorporated into footprintinit, it should also be implemented in isisminer.
Additional context
The slide below shows a polygon with a highlighted self-intersection in blue. The self-intersection was repaired (shown in orange) by applying a buffer of 0.1 around all polygon vertices. Note that typically a buffer of size 0 is applied. Here, a buffer of 0.1 was used for illustration purposes only.
The text was updated successfully, but these errors were encountered: