[Qgis-user] R: Importing a raster into a Geopackage

Nicolas Cadieux njacadieux.gitlab at gmail.com
Tue Dec 1 08:52:54 PST 2020


Hi,

Looking at it now.  I see what you see.  I will try a few things.

Nicolas

On 2020-12-01 11:42 a.m., Alberto Vavassori wrote:
>
> Hi Nicolas,
>
> thank you for the answer. I send the raster that I am interested in.
>
> Alberto
>
> *Da:*Nicolas Cadieux <njacadieux.gitlab at gmail.com>
> *Inviato:* martedì 1 dicembre 2020 17:40
> *A:* Alberto Vavassori <alberto.vavassori at polimi.it>
> *Cc:* qgis-user at lists.osgeo.org
> *Oggetto:* Re: [Qgis-user] Importing a raster into a Geopackage
>
> Hi,
>
> Send a sample data set if you can't figure it out.
>
> Nicolas
>
> On 2020-12-01 10:35 a.m., Nicolas Cadieux wrote:
>
>     Hi,
>
>     Perhaps this can help: https://gdal.orgdrivers/raster/gpkg.html
>     <https://gdal.orgdrivers/raster/gpkg.html>
>
>     “Various kind of input datasets can be converted to GeoPackage
>     raster :
>
>     ·Single band grey level
>
>     ·Single band with R,G,B or R,G,B,A color table
>
>     ·Two bands: first band with grey level, second band with alpha channel
>
>     ·Three bands: Red, Green, Blue
>
>     ·Four band: Red, Green, Blue, Alpha
>
>     GeoPackage rasters only support Byte data type.”
>
>     My guess is that if the original raster does not correspond to one
>     of the categories above, it will be converted to the closest format.
>
>     Nicolas Cadieux
>
>     https://gitlab.com/njacadieux <https://gitlab.com/njacadieux>
>
>
>
>         Le 1 déc. 2020 à 09:58, Alberto Vavassori
>         <alberto.vavassori at polimi.it>
>         <mailto:alberto.vavassori at polimi.it> a écrit :
>
>         
>
>         Hello everybody. I have an issue regarding the Geopackage
>         format. I have tried to import a singleband raster file (it
>         represents the land cover, thus every pixel has a single
>         integer value corresponding to the land cover class), but this
>         operation seems to modify the raster characteristics: the
>         raster becomes a 4-bands raster and the pixels values change
>         accordingly (basically, the original raster is saved in the
>         Geopackage as an RGB image). It seems to be a bug of QGIS. I
>         have also tried to use GDAL translate through the processing
>         toolbox of QGIS to convert the TIFF file to a Geopackage file,
>         but the result is the same.
>
>         Has anybody faced this problem? May anybody suggest a way to
>         work this problem out?
>
>         Thank you.
>
>         Alberto
>
>         _______________________________________________
>         Qgis-user mailing list
>         Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>         List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>         <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>         Unsubscribe:
>         https://lists.osgeo.org/mailman/listinfo/qgis-user
>         <https://lists.osgeo.org/mailman/listinfo/qgis-user>
>
> -- 
> Nicolas Cadieux
> https://gitlab.com/njacadieux  <https://gitlab.com/njacadieux>

-- 
Nicolas Cadieux
https://gitlab.com/njacadieux

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201201/e44a39ae/attachment.html>


More information about the Qgis-user mailing list