Cover polygon with minimal number of overlapping polygons at fixed positions

Pawel

How to select the minimal number of polygons from a set of polygons with fixed positions, whose union covers the input polygon?

For example, let's consider the following input, where the green polygons are the queried set and the blue one is the query:

Input and Query

The correct covering would be with two polygons:

Expected Result

How to calculate which polygons most efficiently cover the input area (minimizing the number of selected polygons)?

Pawel

The solution that seems to give correct results is the following:

  1. Clip all polygons to the queried area

  2. Divide each of the clipped polygon with any others that intersect it, eliminating any duplicates - let's call this operation "chopping". For example, such operation would produce the following non-overlapping polygons:

enter image description here

From the following polygons (clipped by range):

enter image description here

  1. All of the chopped polygons represent the universe in the set covering terms; the chopped polygons covered by a single clipped cover polygon represent a subset

  2. Pre-select all subsets corresponding to the polygons that are not fully covered by the union of other polygons.

  3. Use the approximate algorithm to find the minimum set cover (as described here)

I've implemented this using GeoTools. Here's the code: https://github.com/w-k/MinimalCoverage and the archive with the jar and the dependencies can be downloaded from here: https://github.com/w-k/MinimalCoverage/releases.


I've based this on Ante's answer which was very valuable but did not provide the correct solution. It is incorrect because satisfying the requirement that all intersection parts be covered, results in excessive coverage of the query polygon. For example, the cover polygons clipped by the range polygon (as in the picture above) produce the following common parts:

enter image description here

enter image description here

enter image description here

In order to cover all of the common parts we would have to select all three cover polygons (the middle common part is not entirely covered by either the leftmost nor the rightmost polygon).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related