[GRASS-user] data format changing

Markus Neteler neteler at osgeo.org
Mon Sep 17 05:45:13 PDT 2012


On Mon, Sep 17, 2012 at 7:14 AM, 巩哲 <gongzhe79 at 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


More information about the grass-user mailing list