Closed jaiindimple closed 7 months ago
After some digging and conversation with @rouault :
we know the target extent but not the resolution and we need to reproject.
But, starting from source rasters with different extents when we reproject the resolution can become different, so there is no way we can possibly know a common resolution starting from rasters with different extent.
I mean an "exact" solution does not exist.
a simplified version of @rouault idea to get a consistent resolution is:
A possible workaround is to specify the target resolution.
What is the bug?
I am encountering an issue with gdal.warp() where the output dimensions are inconsistent when mosaicing two sets of images, despite using the same outputBounds and source projection (EPSG:32613) for all images, and converting them to EPSG:4326. The first set of images produces an output with one set of dimensions, while another set results in a different set of dimensions.
Steps to reproduce the issue
Here's the code snippet used for creating the mosaic:
Expected Behavior The output mosaic should have consistent dimensions across different sets of input images when using the same outputBounds and projection. Example:- Width - 4793 Height - 4143
Actual Behavior The dimensions of the output mosaic are inconsistent between different sets of input images, even though the same outputBounds and projection conversion (EPSG:32613 to EPSG:4326) are used. The first two images result in one set of output dimensions:Width-4793 Height-4143 while the next two images produce a different set of dimensions Width-4792 Height-4143.
Versions and provenance
GDAL version: 3.7.3 Python version: 3.9.7 shapely: 2.0.1
Additional context
No response