Background: This project involves mapping regions in GIS environment. I need to find then the intersection of one set of polygons with another set of polygons. I achieved this by casting my map-compatible polygons as Polygon2d (http://geom-java.sourceforge.net/api/math/geom2d/polygon/package-summary.html) and used the intersection method to find the list of vertices for the intersection polygons.
The problem: This works except when there are multiple over lapping regions between the same two polygons. The list of vertices is correct, but I need to seperate the list into each individual polygon.
The first image is what it should look like, the second is what is actually generated:
(ignore the area at the top. Thats a result of a different bug)
How do I detect and correct this situation?