<div dir="ltr">This looks like the same issue you are having. <a href="http://github.com/qgis/QGIS/issues/38227">github.com/qgis/QGIS/issues/38227</a><div>According to the documentation linked in the issue you need to set the band count to 1 otherwise it defaults to 4. </div><div><a href="http://gdal.org/drivers/raster/gpkg.html">gdal.org/drivers/raster/gpkg.html</a><br></div><div>I have not tried this to see if it works. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 1, 2020 at 11:52 AM Nicolas Cadieux <<a href="mailto:njacadieux.gitlab@gmail.com">njacadieux.gitlab@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Hi,<br>
    </p>
    <p>Looking at it now.  I see what you see.  I will try a few things.</p>
    <p>Nicolas<br>
    </p>
    <div>On 2020-12-01 11:42 a.m., Alberto
      Vavassori wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div>
        <p class="MsoNormal"><span style="font-size:12pt">Hi Nicolas,<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">thank
            you for the answer. I send the raster that I am interested
            in.<u></u><u></u></span></p>
        <p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">Alberto<u></u><u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <div>
          <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
            <p class="MsoNormal"><b><span>Da:</span></b><span> Nicolas Cadieux
                <a href="mailto:njacadieux.gitlab@gmail.com" target="_blank"><njacadieux.gitlab@gmail.com></a>
                <br>
                <b>Inviato:</b> martedì 1 dicembre 2020 17:40<br>
                <b>A:</b> Alberto Vavassori
                <a href="mailto:alberto.vavassori@polimi.it" target="_blank"><alberto.vavassori@polimi.it></a><br>
                <b>Cc:</b> <a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a><br>
                <b>Oggetto:</b> Re: [Qgis-user] Importing a raster into
                a Geopackage<u></u><u></u></span></p>
          </div>
        </div>
        <p class="MsoNormal"><u></u> <u></u></p>
        <p>Hi,<span><u></u><u></u></span></p>
        <p>Send a sample data set if you can't figure it out.<u></u><u></u></p>
        <p>Nicolas<u></u><u></u></p>
        <div>
          <p class="MsoNormal">On 2020-12-01 10:35 a.m., Nicolas Cadieux
            wrote:<u></u><u></u></p>
        </div>
        <blockquote style="margin-top:5pt;margin-bottom:5pt">
          <p class="MsoNormal">Hi, <u></u><u></u></p>
          <div>
            <p class="MsoNormal">Perhaps this can help: <a href="https://gdal.orgdrivers/raster/gpkg.html" target="_blank">https://gdal.orgdrivers/raster/gpkg.html</a><u></u><u></u></p>
          </div>
          <div>
            <p class="MsoNormal"><u></u> <u></u></p>
          </div>
          <div>
            <p style="margin-right:0cm;margin-bottom:18pt;margin-left:0cm;line-height:18pt;box-sizing:border-box">
              <span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">“Various
                kind of input datasets can be converted to GeoPackage
                raster :<u></u><u></u></span></p>
            <p style="margin-right:0cm;margin-bottom:0cm;margin-left:54pt;line-height:18pt;box-sizing:border-box">
              <span style="font-size:10pt;font-family:Symbol;color:rgb(64,64,64)"><span>·<span style="font:7pt "Times New Roman"">       
                  </span></span></span><span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">Single
                band grey level<u></u><u></u></span></p>
            <p style="margin-right:0cm;margin-bottom:0cm;margin-left:54pt;line-height:18pt;box-sizing:border-box">
              <span style="font-size:10pt;font-family:Symbol;color:rgb(64,64,64)"><span>·<span style="font:7pt "Times New Roman"">       
                  </span></span></span><span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">Single
                band with R,G,B or R,G,B,A color table<u></u><u></u></span></p>
            <p style="margin-right:0cm;margin-bottom:0cm;margin-left:54pt;line-height:18pt;box-sizing:border-box">
              <span style="font-size:10pt;font-family:Symbol;color:rgb(64,64,64)"><span>·<span style="font:7pt "Times New Roman"">       
                  </span></span></span><span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">Two
                bands: first band with grey level, second band with
                alpha channel<u></u><u></u></span></p>
            <p style="margin-right:0cm;margin-bottom:0cm;margin-left:54pt;line-height:18pt;box-sizing:border-box">
              <span style="font-size:10pt;font-family:Symbol;color:rgb(64,64,64)"><span>·<span style="font:7pt "Times New Roman"">       
                  </span></span></span><span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">Three
                bands: Red, Green, Blue<u></u><u></u></span></p>
            <p style="margin-right:0cm;margin-bottom:0cm;margin-left:54pt;line-height:18pt;box-sizing:border-box">
              <span style="font-size:10pt;font-family:Symbol;color:rgb(64,64,64)"><span>·<span style="font:7pt "Times New Roman"">       
                  </span></span></span><span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">Four
                band: Red, Green, Blue, Alpha<u></u><u></u></span></p>
            <p style="margin-right:0cm;margin-bottom:18pt;margin-left:0cm;line-height:18pt;box-sizing:border-box">
              <span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">GeoPackage
                rasters only support Byte data type.”<u></u><u></u></span></p>
            <p style="margin-right:0cm;margin-bottom:18pt;margin-left:0cm;line-height:18pt;box-sizing:border-box">
              <span style="font-size:12pt;font-family:Arial,sans-serif;color:rgb(64,64,64)">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. <u></u><u></u></span></p>
          </div>
          <div>
            <p class="MsoNormal"><u></u> <u></u></p>
            <div>
              <p class="MsoNormal">Nicolas Cadieux <u></u><u></u></p>
              <div>
                <p class="MsoNormal"><a href="https://gitlab.com/njacadieux" target="_blank">https://gitlab.com/njacadieux</a><u></u><u></u></p>
              </div>
            </div>
            <div>
              <p class="MsoNormal"><br>
                <br>
                <u></u><u></u></p>
              <blockquote style="margin-top:5pt;margin-bottom:5pt">
                <p class="MsoNormal" style="margin-bottom:12pt">Le 1
                  déc. 2020 à 09:58, Alberto Vavassori
                  <a href="mailto:alberto.vavassori@polimi.it" target="_blank"><alberto.vavassori@polimi.it></a>
                  a écrit :<u></u><u></u></p>
              </blockquote>
            </div>
            <blockquote style="margin-top:5pt;margin-bottom:5pt">
              <div>
                <p class="MsoNormal"> <span><u></u><u></u></span></p>
                <p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">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.</span><u></u><u></u></p>
                <p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">Has anybody faced this problem? May
                    anybody suggest a way to work this problem out?</span><u></u><u></u></p>
                <p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">Thank you.</span><u></u><u></u></p>
                <p class="MsoNormal"><span style="font-size:12pt" lang="EN-US">Alberto</span><u></u><u></u></p>
                <p class="MsoNormal"><span>_______________________________________________<br>
                    Qgis-user mailing list<br>
                    <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
                    List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
                    Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><u></u><u></u></span></p>
              </div>
            </blockquote>
          </div>
        </blockquote>
        <pre>-- <u></u><u></u></pre>
        <pre>Nicolas Cadieux<u></u><u></u></pre>
        <pre><a href="https://gitlab.com/njacadieux" target="_blank">https://gitlab.com/njacadieux</a><u></u><u></u></pre>
      </div>
    </blockquote>
    <pre cols="72">-- 
Nicolas Cadieux
<a href="https://gitlab.com/njacadieux" target="_blank">https://gitlab.com/njacadieux</a></pre>
  </div>

_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>