-
-
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
Add Data Type to Raster Calculator #14402
Comments
Author Name: Tim Sutton (Tim Sutton)
|
Author Name: Zdenek Ruzicka (Zdenek Ruzicka) Hi, I have tried to write patch.
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Richard Duivenvoorde (@rduivenvoorde) Hi Zdenek, thanks for the patch! thought to give the patch a try :-) Gui looks nice (maybe a little less wider?) Trying the datatype dropdown on a ecw I have here (I'm no rasterman...), selecting certain types from the dropdown will more or less hang qgis, showing zillion of warnings in the debug window: Is the elements of the Pixel format dropdown dynamic? I mean, should it maybe be checked by the underlying lib which types are available or so? Or maybe testing after one pixel if there is this warning and then come back with some message to optionally break off? Please let us know if you find time to have a look in it, otherwise maybe somebody else should have a look into it.
|
Author Name: Zdenek Ruzicka (Zdenek Ruzicka) Hi Richard, thanks for trying. Elements of the Pixel format dropdown are chosen dynamically from metadata of each driver (using GDALGetMetadataItem( ) and look for GDAL_DMD_CREATIONDATATYPES), only if in metadata is nothing about supported pixel data types, it show you all GDAL supported pixel data formats. It looks that there is some problem with that complex pixel data types, Raster Calculator write into the file, problem 'begin' during opening it :). It looks that gdalinfo has no problem with it. I tried save data using python plugin RasterCalc and there is same problem. I will look at it more in deep. |
Author Name: Zdenek Ruzicka (Zdenek Ruzicka) Does QGIS support rastar data saved in complex pixel data types (eg CFloat32) at all? I am asking, because I tried open file which I created using Raster Calculator (GeoTIFF,CFloat32) and opened it in Grass with success. And I also made GeoTIFF with CFloat32 pixel data format using Grass and I can't open it in QGIS (same warnings: "Warning: GDAL data type is not supported"). |
Author Name: Giovanni Manghi (@gioman) Can someone review the attached patch? |
Author Name: Richard Duivenvoorde (@rduivenvoorde) I tested it (see #4) and found some issues. But I cannot answer the question of Zdenek. Maybe he (or we) can ask the question on the devlist? And then based on that he can do an updated patch? |
Author Name: Marco Hugentobler (@mhugent)
|
Author Name: Marco Hugentobler (@mhugent) The patch looks good and adds important functionality to the raster calculator. There is however one problem with the patch. The GDAL doc says that the array passed to RasterIO for writing needs to have output type. With the patch, calcData is still hardcoded float*, even though the output type can be different: float* calcData; It would be great if you could improve that part of the patch. |
Author Name: Zdenek Ruzicka (Zdenek Ruzicka) Thanks, I will look at this (float* calcData;...). But still I am not sure whether QGIS can read rastar data saved in complex pixel data types (eg CFloat32). I made one file using gdal_translate (gdal_translate -ot CFloat32 -of GTiff elevation.tif elevationGDAL_CFloat32.tif) and still I can't open it in QGIS. |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Pirmin Kalberer (Pirmin Kalberer)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Nyall Dawson (@nyalldawson) This was done in 3.4
|
@nyalldawson I can't see this anywhere in 3.8, was there an regression or maybe the merge was forgotten? |
Author Name: alobo - (alobo -)
Original Redmine Issue: 4475
Redmine category:rasters
Assignee: Marco Hugentobler
The former plugin Raster Calc had the option of selecting a given Data Type (i.e Int16, Float32 etc)
for the output. This was most useful and is not present in the current Raster Calculator
The text was updated successfully, but these errors were encountered: