Closed mohammedX6 closed 2 years ago
JTS doesn't (yet) have the concept of a Topology. It (mostly) operates just on discrete geometry objects. To find voids (AKA gaps) in a polygonal coverage, the easiest way is to combine them into a GeometryCollection
and then use Geometry.union()
to create a MultiPolygon
. Then voids show up as holes in the element polygons.
If you are sure that the input is a valid polygonal coverage you can also use CoverageUnion
to do this more performantly.
Thanks for the response dr. I thought the same thing, but I ended to abandon this idea because my problem is a complex one What I am trying to do is this :
Suppose we have a point that is surrounded by polygons how to check if the point is in a void with no gaps between polygons Like this
For my use case finding holes in the polygons was suffiect.
How do we find voids between polygons? More information