Masking a raster file using another file with different resolution and

36 views Asked by At

I have two raster files (ras1 and ras2) with differently extent and resolution. I need to overlap them to mask values of ras1 with ras2. I am using python and packages (e.g., geopandas, shapely, rasterio) to preform the analysis. I was wondering what is the best way to overlap layers (and pixels one by one with same size and same position) to mask them? For example, should I clip ras1 (larger extent) using the boundary of ras2 (smaller extent) and than resample pixels of ras1 to overlap pixels of two layers exactly? I mean how I can overlap relevant pixels of two layers exactly? Here is how layers are overlapped.

enter image description here

0

There are 0 answers