-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
"Save as..." does not work for rasters #22211
Comments
Author Name: Luigi Pirelli (@luipir) confirmed with the following revision beaa45e
|
Author Name: Radim Blazek (@blazek) I found the raster save as dialog pretty broken. CRS and size/resolution are not set correctly by default, which results for example in "Attempt to create 0x0 dataset".
|
Author Name: Nyall Dawson (@nyalldawson) Radim - looks ok to me. What circumstances do you see the incorrect values? |
Author Name: Alexander Bruy (@alexbruy) Also looks fine here. Extent, CRS and size set correctly. Screenshoot attached.
|
Author Name: Radim Blazek (@blazek) I have Settings > Options > CRS > Don't enable 'on the fly' reprojection If I add landcover.img (EPSG 2964, 3663x1964, resolution 3280) and open save as, it is set to: CRS: EPSG 4326 It should be set to the original raster values. In any case, extent is in EPSG 4326 while resolution in EPSG 2964, that is also why the size is 0x0. Alexander Bruy wrote:
Correctly? Is not the size 0x0? Does not that fail with "Attempt to create 0x0 dataset"? |
Author Name: Nyall Dawson (@nyalldawson) Does this happen every time for you? I can't reliably reproduce it. For me (with OTF off) it defaults to the project CRS, and the derived values are correctly set. I'm not sure if the dialog should default to the layer CRS or project CRS, but that's a different discussion.... |
Author Name: Radim Blazek (@blazek) Playing with landcover.img, I found more serious #22227. Nyall Dawson wrote:
Excent/resolution/size are initially wrong only if project is in geographic CRS. If you switch then manually in save as dialog to another (or even to the same) CRS, the values are corrected.
I believe that default should be layer's CRS, extent and size, otherwise data are lost and that should only happen intentionally (manually select). Apart loosing data, it can also result in huge output raster, take for example our example, if output CRS for landcover.img is set to epsg:4326, it calculates resolution 0.000951617,0.0126326 and size 378266,1761! Hardly useful. |
Author Name: Nyall Dawson (@nyalldawson) Fixed in changeset "8fc405648be18870133e318cbfc7cb0918efe4b1".
|
Author Name: Nyall Dawson (@nyalldawson) Should be fixed with #22373, and the above commit switches the default CRS to match the layer CRS rather than the project CRS. |
Author Name: Alexander Bruy (@alexbruy)
Original Redmine Issue: 14209
Affected QGIS version: master
Redmine category:rasters
To reproduce
In console I see this```
src/core/qgsproviderregistry.cpp: 462: (function) [0ms] Library name is /home/alex/devel/cpp/qgis/build/output/lib/qgis/plugins/libgdalprovider.so
src/providers/gdal/qgsgdalprovider.cpp: 2754: (create) [0ms] create options:
ERROR 1: Attempt to create 0x0 dataset is illegal,sizes must be larger than zero.
src/providers/gdal/qgsgdalprovider.cpp: 2764: (create) [1ms] Cannot create new dataset /tmp/test.tif:
Attempt to create 0x0 dataset is illegal,sizes must be larger than zero.
src/providers/gdal/qgsgdalproviderbase.cpp: 29: (QgsGdalProviderBase) [0ms] Entered
src/providers/gdal/qgsgdalprovider.cpp: 227: (~QgsGdalProvider) [0ms] entering.
src/core/qgsproviderregistry.cpp: 462: (function) [0ms] Library name is /home/alex/devel/cpp/qgis/build/output/lib/qgis/plugins/libgdalprovider.so
ERROR 4: `/tmp/test.tif' does not exist in the file system,
and is not recognised as a supported dataset name.
The text was updated successfully, but these errors were encountered: