I'm trying to complete a code implementing the Kirkpatrick algorithm in Java using JTS and it's literally the first time doing working with such tools. There's a part that I need to remove a known point P (in the independent set) from a region which is consisted of multiple polygons all intersecting in P and return the remaining hole to be triangulated. The question is how to do remove a point P from a MultiPolygon?
/**
* Find a bounding polygon if point p is removed from affected regions
*
* @param p
* @param affectedRegions
* @return
*/
public Polygon findBoundingPolygon(Coordinate p, List<Geometry> affectedRegions) {
// TODO: write a function that finds a bounding polygon
GeometryFactory fact = new GeometryFactory();
Geometry regions = fact.buildGeometry(affectedRegions);
// TODO: bound <- a concave hull of regions
LinearRing shell = fact.createLinearRing(coordsToLinearRingCoords(bound));
return new Polygon(shell, null, fact);
}