- masking using another raster
Re: masking using another raster
toggle quoted messageShow quoted text
Yes, I think that's the only builtin command that will do it. Enhancing rio-stack to more clearly provide this feature might be feasible. Note that few formats support addition of a mask and that adding a mask generally requires creation of a new file.
Simple question, but I want to make sure I'm doing this the canonical way.
Assume two single-band rasters with identical projections/transforms and one of the rasters has NODATA pixels defining an irregular shape and 1 otherwise. Is the best way to mask the other raster to use rio calc? e.g.:
rio calc "(* (read 1) (read 2))" -o out.tif input.tif mask.tif
This works, but didn't know if a different utility is better suited.
Join firstname.lastname@example.org to automatically receive all group messages.