I'm a bit new to working with polygon data (in C# using NetTopologySuite
) and want to get the bounding box of several polygons, depending on the fact whether the bounding box of each polygon is overlapping with another polygon (polygon clustering).
In this demo, I have 3 polygons, whose bounding boxes overlap with the others, and would like to have the red bounding box as an ultimate result.
Basically I'm already stuck getting the bounding box of the polygon.
I tried Geometry.Boundary
, but that just gives back the outer ring...
Finally I could just iterate over the coordinates, but I was wondering if the Geometry
or Polygon
classes have this capability build in (or if the library has this build in).
This is the fastest way to get the bounding box of a set of NTS geometries: