<div dir="ltr">Got it, thanks for your quick response!</div><br><div class="gmail_quote"><div dir="ltr">On Mon, 10 Dec 2018 at 16:59, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On lundi 10 décembre 2018 16:29:09 CET Idan Miara wrote:<br>
> Hi,<br>
> <br>
> I'm trying unsuccessfully to save Int16 dataset with scale != 1.0 in GPKG.<br>
> <br>
> If I understand correctly the remark about "Tiled gridded coverage data"<br>
> here:<br>
> <a href="https://www.gdal.org/drv_geopackage_raster.html" rel="noreferrer" target="_blank">https://www.gdal.org/drv_geopackage_raster.html</a><br>
> I expect offset and scale for Int16 to be supported in gdal.<br>
> <br>
> I tried to gdal_translate an int16 dataset from GTiff to GPKG and the scale<br>
> value is lost (at lease as far as QGIS is concerned).<br>
> I also translated the output gpkg back to GTiff and verified that the scale<br>
> is 1.0 instead of 2.0 as in my original GTiff.<br>
<br>
Yes, the Scale and Offset concepts as exposed by GDAL are ignored in reading <br>
or writing by the GeoPackage driver and haven't been mapped to the <br>
corresponding GPKG concepts. I guess this could be done, but for now the GPKG <br>
scale and offset have been kept as internal details when forcing a PNG <br>
encoding for a Float32 data type, and the driver will automatically set and <br>
apply scale and unscale, but not expose the raw values and the scale and <br>
offset metadata values.<br>
<br>
For now, the solution is to use gdal_translate -unscale so as to convert the <br>
raw values into values after applying scale and offset.<br>
<br>
Even<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div>