[GRASS5] raster category confusion
Markus Neteler
neteler at itc.it
Tue Aug 30 02:31:06 EDT 2005
On Mon, Aug 29, 2005 at 09:13:44PM +0100, Glynn Clements wrote:
>
> Markus Neteler wrote:
>
> > the more I look into the problems of r.average and friends,
> > the more confused I get.
> >
> > Simple test (Spearfish):
> >
> > g.region n=4925010 s=4924770 w=598380 e=598740 nsres=120 ewres=90 -p
> > r.mapcalc "one=1"
> >
> > r.info -t one
> > datatype=CELL
>
> What do you get without -t?
I get this:
GRASS 6.1.cvs (spearfish60):~/grass61/scripts/v.rast.stats > r.info one
+----------------------------------------------------------------------------+
| Layer: one Date: Mon Aug 29 15:32:38 2005 |
| Mapset: neteler Login of Creator: neteler |
| Location: spearfish60 |
| DataBase: /ssi0/ssi/neteler/grassdata |
| Title: ( one ) |
|----------------------------------------------------------------------------|
| |
| Type of Map: cell Number of Categories: 1 |
| Data Type: CELL |
| Rows: 2 |
| Columns: 4 |
| Total Cells: 8 |
| Projection: UTM (zone 13) |
| N: 4925010 S: 4924770 Res: 120 |
| E: 598740 W: 598380 Res: 90 |
| Range of data: min = 1 max = 1 |
| |
| Data Source: |
| |
| |
| |
| Data Description: |
| generated by r.mapcalc |
| |
| Comments: |
| 1 |
| |
+----------------------------------------------------------------------------+
GRASS 6.1.cvs (spearfish60):~/grass61/scripts/v.rast.stats > g.gisenv
GISDBASE=/ssi0/ssi/neteler/grassdata
LOCATION_NAME=spearfish60
MAPSET=neteler
GRASS_DB_ENCODING=utf-8
DEBUG=0
MONITOR=x0
GRASS_GUI=text
GRASS 6.1.cvs (spearfish60):~/grass61/scripts/v.rast.stats > locate one| grep spearfish60
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/cell/one
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/cell_misc/one
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/cell_misc/one/null
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/cell_misc/one/range
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/cell_misc/one
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/hist/one
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/cellhd/one
/hardmnt/thuille0/ssi/grassdata/spearfish60/neteler/cats/one
GRASS 6.1.cvs (spearfish60):/hardmnt/thuille0/ssi/grassdata/spearfish60 > find . -name one
./neteler/cell/one
./neteler/cell_misc/one
./neteler/hist/one
./neteler/cellhd/one
./neteler/cats/one
> > r.stats -1 one
> > 120
> > 156
> > 99
> > 100
> > 120
> > 156
> > 99
> > 100
>
> That's at odds with the "r.mapcalc one=1", and shouldn't have anything
> to do with categories.
Right. Looks a bit ugly.
> Do you have some other mapset in the search path ahead of the current
> mapset?
GRASS 6.1.cvs (spearfish60):/hardmnt/thuille0/ssi/grassdata/spearfish60 > g.mapsets -p
neteler PERMANENT user1
It seems that there is only this single map gives wrong results.
It's a 32bit RHEL4 box.
Markus
More information about the grass-dev
mailing list