[gdal-dev] Issues with SetColorTable() and multi-sample TIFF
afernandez
afernandez at odyhpc.com
Tue Feb 14 15:06:24 PST 2023
Hi Even,
I checked and it doesn't seem that GDAL was built with KEA support. I built it with aptitude so my input was minimal. The installation included:
$ sudo apt install gdal-bin libgdal-dev python3-gdal
Should I install any other package or would the solution involve installing GDAL from source?
[Info: the system is running Ubuntu 20.04 and it returns:
$ gdalinfo --version
GDAL 3.0.4, released 2020/01/28]
Thanks,
AFernandez
Even Rouault wrote:
Le 14/02/2023 à 18:46, afernandez a écrit :
Hello Even,
Thank you for the quick reply. I'll try using GDAL subdatasets later this afternoon (although I'm not sure if this solution would become a bit messy for hundreds of files). The format KEA is completely new to me. I was able to install KEALib but found only one source of information online (https://gdal.org/drivers/raster/kea.html <https://gdal.org/drivers/raster/kea.html> ). To start somewhere, I simply modified the first 2 lines of the script to:
driver_name = 'KEA'
driver = gdal.GetDriverByName(driver_name)
However, it doesn't pick it up (driver returns 'None'). Ideally there would be some example that I could follow but I might have to do this piecewise in the meantime.
You need to tune your build so it finds KEALib. See https://gdal.org/development/building_from_source.html#kea <https://gdal.org/development/building_from_source.html#kea> for related CMake options. "grep GDAL_USE_KEA CMakeCache.txt" should report ON if things are proprerly configured. Once the driver is available in your GDAL build, just changing the name of the driver should be sufficient
See also https://github.com/OSGeo/gdal/blob/master/.github/workflows/ubuntu_20.04/build-deps.sh#L30 <https://github.com/OSGeo/gdal/blob/master/.github/workflows/ubuntu_20.04/build-deps.sh#L30> for an example of a CI configuration that builds with libkea support (not much to do if you install it in a standard location looked for by cmake)
-- http://www.spatialys.com <http://www.spatialys.com> My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230214/611ccc15/attachment.htm>
More information about the gdal-dev
mailing list