Background:
I have two .tif files
- band_06 (20m resolution, i.e pixel size 20,20)
- lulc ("10"m resolution, pixel size 9.994 9.992)
and a .shp file
- square
All files have the same CRS (EPSG:32632 - WGS 84 / UTM zone 32N).
Goal:
Both files should be transformed to a type that can be exported as a .csv file.
Problem: The cells of the rasters do not lineup as they should, in addition to a mismatch of total cells present in the attribute table.
Workflow:
band_06:
- Import band_06
- Resample to 10m
- Clip raster by mask layer (square.shp)
- Raster pixels to polygons
lulc:
- Import lulc
- Warp (reproject) to 10m
- Clip raster by mask layer (square.shp)
- Raster pixels to polygons
My suspicion is that warping lulc is causing the problem here, however I am not sure how to otherwise line the two files up such that the pixel cells are perfectly on top of one another.
How can I achieve the manipulation of the the imperfect lulc (with 9.994, 9.992 pixel size) to match the resampled band_06 (10, 10 pixel size) while also making sure that the end results after conversion from raster pixels to polygons is going to yield perfectly overlapping grid cells?
Image of problem:
The purple-gray overlay is the band_06 layer with increased transparency, with the underlying beige layer is representative of the lulc layer.