Closed robyngit closed 1 year ago
There is now a clip_to_footprint
option for the workflow. Setting it to true
for the IWP layer removes the problem spots that we were seeing before.
Before
After
In this example, a polygon is kept if its boundary and interior intersect with the interior of the footprint (but not its boundary or exterior). This setting is called within
and is the default behaviour of the clip_by_footprint
method, but any predicate that can be used in the geopanda's sjoin method can be set (See shapely binary-predicates)
The IWP footprint boundaries don't align perfectly with the input data. For example:
This results in bright artifacts in the resulting raster layer where the input data spills over the boundaries:
To resolve this, we decided in our PDG meeting today that the input vector file should be cropped using the footprint boundary. A polygon is considered inside the boundary if 1) its centroid is within the footprint boundary OR 2) the polygon is completely within the boundary. (Can test both and see which gives better results).
This issue encompasses adding this clipping step as an (optional/configurable) part of the footprints-deduplication method.