[gdal-dev] Motion: adopt RFC 87: Signed int8 data type for raster

Hermann Rodrigues hermann.rodrigues at gmail.com
Wed Nov 16 11:23:53 PST 2022


Hi

>

> > So based on that RFC it is a breaking change when reading signed
> > images. I confess that this type of silent behavor change scares me.
> It is documented in
> https://github.com/OSGeo/gdal/blob/master/MIGRATION_GUIDE.TXT which is
> always referenced in the release notes.
> >
> > Why dont make this an opt-in behavior instead of just breaking
> > application code silently?
> Opt-in behaviour would mean clutering the GDAL code base even more, to
> implement both the legacy and the new behavior. One of the purposes of
> the RFC was to de-clutter the GDAL code base.
>

I understand the idea of decluttering the code base and I think it is a
valid point and I agree that not having to check PIXELTYPE when reading or
writing images is better. What I still don't understand is why break code
in a way that the compiler would not help at all when just compiling a
library or application against the new GDAL version.

I think long term compatibility is a very desirable feature, and several
applications just use GDAL as part of their code base without even being
aware of what is happening in the GDAL development front. The same is true
for several other libraries, given the fact the use of package managers
(VCPKG, conan etc) are becoming more common. For some code bases, GDAL is
just a small cog, and I believe it is very easy for the developers to
simply download the next version from the package manager thinking that
they are getting mostly bug fixes and not being aware of new silent
incompatibilities.


> > Otherwise, I would rather have GDT_Byte removed so that application
> > code would not compile against new versions of GDAL. At least that
> > makes migration to new versions less risky.
>
> Removing GDT_Byte would have enormous breaking implications! Signed Byte
> is I believe a marginal feature not commonly used by GDAL based
> applications, partly because the support for it before RFC87 was clunky
> and partial.
>

Sorry, but I think it is funny that you mention removing GDT_Byte would
have breaking implications, since I am expressing my reservations against a
change that will have breaking implications. :)

I don't understand what limitations you are referring to. Perhaps the
support was broken to some types of raster files? In my field, signed 8-bit
images representing categorical images are very common, given the fact they
can be used fully decompressed and represent a null value/nodata in very
convenient way (as a negative value).

Best,

hermann

----------------------------------------------------------------------
Hermann Rodrigues
hermann.rodrigues at gmail.com
hermann at csr.ufmg.br
Twitter: @horodrigues | @dinamica_ego
Centro de Sensoriamento Remoto / UFMG
https://csr.ufmg.br | https://dinamicaego.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221116/94109a2b/attachment.htm>


More information about the gdal-dev mailing list