-
-
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
[Raster] Add a Qgis::DataType::Int8 signed data type #51587
Conversation
Is there anything in particular you're worried about here? From a look over the changes it's all additions to handling int8 only, so even buggy support for that is better then the current no support IMO. |
no, not really. That could be fine in 3.30 as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in 3.30 👍
It might still be useful to merge #51586 and have it backported to 3.28 so that the next LTR gets a minimal GDAL support for Int8 rasters when/if GDAL 3.7 is used at some point with QGIS 3.28 |
@rouault good point! |
@rouault souldn't the Int8 / GDT_Int8 value be added to the QgsGdalUtils::gdalDataTypeFromQgisDataType function? QGIS/src/core/qgsgdalutils.cpp Lines 453 to 497 in 0b59017
|
good catch. added (weird that the compiler didn't emit a warning about the missing case) |
@rouault Do I correctly understand that with this PR, the "output data types" parameter of the algs will get one more item (for those running gdal 3.7)? |
@DelazJ, the output data types for following GDAL algorithms should be updated: ClipRasterByExtent.py Since it is an enum value, maybe it would be better to insert the new value at the end, in order to maintain compatibility with previous versions. |
Plus a few QGIS ones (qgis/QGIS-Documentation@master...DelazJ:QGIS-Documentation:rasterTypesInclude), isn't it?
That was my next question after the first one is confirmed. Considering that we have enum, where is that new value put ? (doesn't seem to be at the end in the code, so would it not break existing scripts?) |
Re processing algorithms , I'm not familiar with them, so hard to comment for sure. But at first sight it seems that it is a drop down of strings, and that the index is stored (at least that's what I see in files like python/plugins/processing/tests/testdata/qgis_algorithm_tests4.yaml), which is a bit unfortunate. So yes, "Int8" if it was added should likely be put at the end to avoid breaking existing code/scripts. But perhaps I'm wrong |
Exactly.
or:
|
For those ones (native:rasterbooleanand, native:rasterbooleanor, native:reclassifybylayer, native:reclassifybytable) the following code should be updated: QGIS/src/analysis/processing/qgsrasteranalysisutils.cpp Lines 187 to 203 in 6f55927
|
Continuation of #51586
Probably 3.32 material at that point?