Closed bradh closed 8 years ago
After this is clarified, then we need to figure out if the min
, max
, mean
and std_dev
fields in gpkg_2D_gridded_tile_ancillary
are scaled and offset or not.
Today the SWG agreed that the offset shall be added to the stored value and the scale shall be multiplied.
I forgot to ask today on the other two questions.
I believe
So as to not delay things further, I will ask SWG members to review these two questions and make sure we are in agreement.
I had the same question while reading the spec. For reference, in GDAL VRT, the use of scale and offset is the same as the one suggested by @jyutzler : "For linear scaling, applying the scale ratio, then scale offset ". In code : fResult = (float) (fResult * dfScaleRatio + dfScaleOff);
In today's SWG we agreed to update the text to make it consistent with what is here.
gpkg_2D_gridded_coverage_ancillary
has a columnoffset
, which is not well specified.Given a DEM with a negative minimum height (relative to the vertical datum) - say -20 metres, if the samples are offset by 20 metres such that the range of altitude is [0 ... max + 20], then should the offset be -20 or 20? Equivalently, given a sample value of X, should I add the offset value or subtract the offset value to get the true elevation relative to datum.
Similarly, if the scale is != 1, does the offset get affected by scale or not? That is, is offset scaled by the scale multiple before being stored?