Hi, Perhaps it is just about how you open your GeoPackage. See https://gdal.org/drivers/raster/gpkg.html:
"Opening options By default, the driver will expose a GeoPackage dataset as a four band (Red,Green, Blue,Alpha) dataset, which gives the maximum compatibility with the various encodings of tiles that can be stored. It is possible to specify an explicit number of bands with the BAND_COUNT opening option." -Jukka Rahkonen- Oechslin Stefan Maximilian wrote > Hi > > I try to use gdal_translate in my windows command prompt to convert a > single band .tif raster to a single band .gpkg. > > gdal_translate -of GPKG example.tif example.gpkg > > I always get a .gpkg with four bands and the nodata pixels get changed to > a value of 255. > I tried all possible combinations of the following commands with no > succes: > > -band > -mask > -expand > > Do you have any idea what I am missing? > > Thanks > Stefan > > _______________________________________________ > gdal-dev mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/gdal-dev -- Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
