I have two arrays:
(A) One array contains observation values for each pixel (e.g., satellite band data). (B) The other array contains corresponding coordinates(lat/lon) for each pixel.
I want to combine these two arrays into a single GeoTIFF file. My proposed method involves using the coordinates in array (B) to calculate an affine transformation and then using rasterio to perform a simple transformation.
However, this approach may introduce significant errors since it only considers the top-left and bottom-right coordinates.
I would like to create a more accurate GeoTIFF by utilizing the coordinates for each pixel. Could you please explain how to achieve this? (Python, GDAL, Rasterio, etc)