rasterio WarpedVRT vs QGIS Warp tool #3042
Unanswered
amit-hazan
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@amit-hazan warping is complicated and so it's hard to say for sure. There might be slight math differences between WarpedVRT and QGIS. If Rasterio and QGIS are compiled with different GDAL or PROJ versions that could be an issue. Finally, PROJ results can be sensitive to the version of your EPSG database or access to PROJ datum grids. What kind of discrepancies do you see? Does it look like an unexpected nearest neighbor pixel due to small sub-pixel shifts? Or something else? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have encountered a discrepancy in the results when attempting to reproject a GeoTIFF file into a new CRS using the
WarpedVRT
class from the rasterio library. I'm aiming to reproject the GeoTIFF file into EPSG:4326 CRS. Here's the function I used:To validate the result, I utilized the "Warp (reproject)" tool within QGIS:
Upon comparing the outputs, I noticed differences in some of the pixel values within the datasets. The CRS, transform, width, and height were consistent between both rasters.
Additionally, I conducted a third test using the following function:
This method produced identical results to those obtained from QGIS.
My setup:
pip install rasterio==1.3.9
My question is - why does the WarpedVRT approach (warp_4326 function) yield different outputs compared to QGIS (and the reproject_4326 function)? Is it a bug or am I missing something?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions