r.in.gdal and r.external fail to import GDAL Virtual Rasters (VRT) with Int8 datatype.
Int8 was relatively recently introduced to GDAL (3.7) and then made available in VRT datasets.
While GRASS GIS reads Int8 data in GeoTiff format, it fails with that datatype in VRT format.
To reproduce
# Create a Int8 raster in GeoTiff
gdal_create -ot Int8 -of GTiff -outsize 24 24 -burn 1 -a_srs EPSG:25833 -a_ullr 0 24 24 0 ./test.tif
# Create a VRT from it
gdal_translate -of VRT ./test.tif ./test.vrt
# Import the GeoTiff (works)
r.in.gdal -o input=test.tif output=test.tif
# Try to import the VRT (fails)
r.in.gdal -o input=test.vrt output=test.vrt
r.external -o input=test.vrt output=test.vrt
The last two commands fail with:
ERROR 1: Invalid dataType = Int8
ERROR: Unable to open datasource <test.vrt>
Describe the bug
r.in.gdal
andr.external
fail to import GDAL Virtual Rasters (VRT) with Int8 datatype. Int8 was relatively recently introduced to GDAL (3.7) and then made available in VRT datasets. While GRASS GIS reads Int8 data in GeoTiff format, it fails with that datatype in VRT format.To reproduce
The last two commands fail with:
Expected behavior
GRASS GIS should import VRT with Int8 data.
System description
Additional context
GRASS GIS does not seem to be the only one here: https://community.safe.com/data-7/int8-gdal-vrt-raster-not-supported-by-fme-18505