Mask a grid by a polygon: pixels OUTSIDE the polygon become NaN (or inside, with invert). The footprint/bounds are unchanged. Restricts the point-in-polygon scan to the polygon's pixel bbox.
invert
a SpatialFilter, or a ring/multi-ring of {lat,lng}|[lat,lng]
Optional
Mask a grid by a polygon: pixels OUTSIDE the polygon become NaN (or inside, with
invert). The footprint/bounds are unchanged. Restricts the point-in-polygon scan to the polygon's pixel bbox.