[GRASS-dev] scale and offset in raster maps

Hi developers,
I am pretty sure in the past I saw somewhere in the raster format the
concept of scale and offset, by which the data are math-transformed
when read.
I went throught the developers manual but wasn't able to find it.
Can someone please tell me if the scale-offset tranform is something
supported in the format or if I am just remembering wrong.

Thanks,
Andrea

andrea antonello wrote:

I am pretty sure in the past I saw somewhere in the raster format the
concept of scale and offset, by which the data are math-transformed
when read.
I went throught the developers manual but wasn't able to find it.
Can someone please tell me if the scale-offset tranform is something
supported in the format or if I am just remembering wrong.

Raster maps are resampled based upon the current region. This is a
scale-and-offset transformation; there is no rotation or skew.

--
Glynn Clements <glynn@gclements.plus.com>

Probably I wasn't clear enough, or better don't know exactly how to
explain this.
I'm not talking about resampling, btu instead of threating of a single
value. In scientific data often you could store integer maps for
several reasons and there is an offset and scale value that have to be
applied to get the usable physical floating point value of the map.
Scale and offset are defined in formats as for example netcdf and I
thought I saw this also in GRASS in the past.

Andrea

On Mon, Sep 15, 2008 at 9:29 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:

andrea antonello wrote:

I am pretty sure in the past I saw somewhere in the raster format the
concept of scale and offset, by which the data are math-transformed
when read.
I went throught the developers manual but wasn't able to find it.
Can someone please tell me if the scale-offset tranform is something
supported in the format or if I am just remembering wrong.

Raster maps are resampled based upon the current region. This is a
scale-and-offset transformation; there is no rotation or skew.

--
Glynn Clements <glynn@gclements.plus.com>

Andrea antonello wrote:

I'm not talking about resampling, btu instead of threating of a single
value. In scientific data often you could store integer maps for
several reasons and there is an offset and scale value that have to be
applied to get the usable physical floating point value of the map.
Scale and offset are defined in formats as for example netcdf and I
thought I saw this also in GRASS in the past.

see http://grass.osgeo.org/wiki/MODIS#Processing
     http://grass.osgeo.org/wiki/MODIS#Processing_3
     etc.

Hamish

Hi Hamish,
thanks for your answer.

I just wanted to know if the internal GRASS binary format has this
metadata inside. At that point I guess that the answer is no?

Thanks,
Andrea

On Mon, Sep 15, 2008 at 2:59 PM, Hamish <hamish_b@yahoo.com> wrote:

Andrea antonello wrote:

I'm not talking about resampling, btu instead of threating of a single
value. In scientific data often you could store integer maps for
several reasons and there is an offset and scale value that have to be
applied to get the usable physical floating point value of the map.
Scale and offset are defined in formats as for example netcdf and I
thought I saw this also in GRASS in the past.

see http://grass.osgeo.org/wiki/MODIS#Processing
    http://grass.osgeo.org/wiki/MODIS#Processing_3
    etc.

Hamish

Hi Andrea,

On Mon, Sep 15, 2008 at 3:04 PM, andrea antonello
<andrea.antonello@gmail.com> wrote:

Hi Hamish,
thanks for your answer.

I just wanted to know if the internal GRASS binary format has this
metadata inside. At that point I guess that the answer is no?

did you check
http://download.osgeo.org/grass/grass6_progman/gisrasterlib.html
?

(yes, that document needs improvements...).

ciao
Markus

andrea antonello wrote:

I just wanted to know if the internal GRASS binary format has this
metadata inside. At that point I guess that the answer is no?

Correct.

For an integer map, you can store floating-point values in the
category labels; some modules can use the values from the labels
instead of the raw category value. You can also create a reclass map,
but the values are restricted to integers.

--
Glynn Clements <glynn@gclements.plus.com>

I just wanted to know if the internal GRASS binary format has this
metadata inside. At that point I guess that the answer is no?

Correct.

For an integer map, you can store floating-point values in the
category labels; some modules can use the values from the labels
instead of the raw category value. You can also create a reclass map,
but the values are restricted to integers.

Thanks, that is what I wanted to know.

Andrea

--
Glynn Clements <glynn@gclements.plus.com>

Jus as a small note after a little further research I did. I'm not
sure, but probably I was recalling the quantization rules to get from
floating point values to integers, as hold in
cell_misc/mapname/f_quant. Sadly that is not what I hoped to find.

Thanks for the help.

Ciao
Andrea

> I just wanted to know if the internal GRASS binary format has this
> metadata inside. At that point I guess that the answer is no?

Glynn:

Correct.

For an integer map, you can store floating-point values in the
category labels; some modules can use the values from the labels
instead of the raw category value. You can also create a reclass map,
but the values are restricted to integers.

and of course you can add whatever metadata comments you like with r.support. But they will have no automatic effect.

Hamish