[GRASS-user] data format changing

Hi,I had met some problems about data format.
Firstly,I imported SPOTVGT NDVI file into GRASS, by using i.in.spotvgt, the data range is -0.96~0.92 (already resampled by r.mapcalc).Then I need a binary image for analyzing in another software,so I exported
the map by using r.out.bin -ib input=XXXXX,output=XXXXX,then a 16 bit binary image was created, but the data value became only 0 or 1. So when and where should I change the data format by using what command?
Looking forward to your reply!Thank you so much.

On Mon, Sep 17, 2012 at 7:14 AM, 巩哲 <gongzhe79@gmail.com> wrote:

    Hi,I had met some problems about data format.
    Firstly,I imported SPOTVGT NDVI file into GRASS, by using i.in.spotvgt,
the data range is -0.96~0.92 (already resampled by r.mapcalc).

Yes, this is within the NDVI range.

Then I need a binary image

What do you mean with "binary map"? Which format would you like to use?

for analyzing in another software,so I exported
the map by using r.out.bin -ib input=XXXXX,output=XXXXX,then a 16 bit binary
image was created, but the data value became only 0 or 1.

You requested an integer map
http://grass.osgeo.org/grass64/manuals/html64_user/r.out.bin.html

so values in the range of -1 ... +1 are mapped into -1,0,1.

So when and where
should I change the data format by using what command?

To share data with other software packages, likely r.out.gdal is the better
option to export to common GIS formats.

Markus

On Mon, Sep 17, 2012 at 2:45 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Mon, Sep 17, 2012 at 7:14 AM, 巩哲 <gongzhe79@gmail.com> wrote:

...

Then I need a binary image

What do you mean with "binary map"? Which format would you like to use?

From the offlist indication you gave, I see that only 8-bit unsigned integer,

16-bit signed integer or 32-bit signed real data are supported by that software.

Hence I would multiply the NDVI values in GRASS with 100.0 (r.mapcalc)
and then export with r.out.bin to integer.

Markus