Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdalwarp on 3.4.3 behaving differently to 3.4.2 #28731

Closed
qgib opened this issue Jan 3, 2019 · 2 comments
Closed

gdalwarp on 3.4.3 behaving differently to 3.4.2 #28731

qgib opened this issue Jan 3, 2019 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Rasters Related to general raster layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Jan 3, 2019

Author Name: Ross Edwards (Ross Edwards)
Original Redmine Issue: 20912
Affected QGIS version: 3.4.3
Redmine category:gdal_tools
Assignee: Ross Edwards


I found an entirely repeatable issue with gdalwarp commands that worked perfectly on 3.4.2, but on 3.4.3 they appear to generate slightly off height and width.

on 3.4.2 I run the following 2 commands separately in Python console -

gdalwarp -t_srs EPSG:32631 -wo SOURCE_EXTRA=1000 -tr 5.0 5.0 -r cubic -of GTiff "E:/Users/rosso/Arma/Terrain Heightmaps/Heightmaps Opentopo/output_srtm.asc" D:/Arma/QGIS/crm4.tif

gdalwarp -of GTiff -cutline E:\Users\rosso\Arma\QGIS\UTM31N\Test23-11-18\shape.shp -crop_to_cutline "D:/Arma/QGIS/crm4.tif" D:/Arma/QGIS/cut6.tif

which generates a perfect 8192 x 8192 tif
https://ibb.co/6PmvQ8x

However running exactly the same on 3.4.3

gdalwarp -t_srs EPSG:32631 -wo SOURCE_EXTRA=1000 -tr 5.0 5.0 -r cubic -of GTiff "E:/Users/rosso/Arma/Terrain Heightmaps/Heightmaps Opentopo/output_srtm.asc" D:/Arma/QGIS/crm5.tif

gdalwarp -of GTiff -cutline E:\Users\rosso\Arma\QGIS\UTM31N\Test23-11-18\shape.shp -crop_to_cutline "D:/Arma/QGIS/crm5.tif" D:/Arma/QGIS/cut7.tif

I get a tif with 8191 x 8191
https://ibb.co/0GcptBT

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2019

Author Name: Ross Edwards (Ross Edwards)


Just to confirm the shapefile feature used to cut the tif is a perfect square 40960 x 40960 so at 5m resolution I expect 8192 output

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2019

Author Name: Nyall Dawson (@nyalldawson)


If the difference is encountered when using the exact same gdal command then the change must be in gdal itself -- you'll need to file this on gdal's tracker.


  • resolution was changed from to up/downstream
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Jan 4, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Rasters Related to general raster layer handling (not specific data formats) Crash/Data Corruption labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption Rasters Related to general raster layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant