[GRASS-user] What output from r.topidx?

   Following the example on the r.topidx man page I ran the two following
commands:

r.mapcalc "house_elev = if (isnull(aberDEM), aberDEM, house_catchment)"

r.topidx in=house_elev out=house_tci

   I can find no output. house_tci does not display in a monitor, running
r.stats -Anc house_tci out=house_stats
produced an empty file, and so did
r.reports house_tci

   What have I missed here that I find no output at tall?

Rich

On Thu, Feb 11, 2010 at 12:50 AM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

Following the example on the r.topidx man page I ran the two following
commands:

r.mapcalc "house_elev = if (isnull(aberDEM), aberDEM, house_catchment)"

here please run
r.univar house_elev
to check for the map statistics.

r.topidx in=house_elev out=house_tci

I can find no output. house_tci does not display in a monitor, running
r.stats -Anc house_tci out=house_stats
produced an empty file, and so did
r.reports house_tci

What have I missed here that I find no output at tall?

g.region comes to mind...
g.region -p
?

Markus

Rich Shepard wrote:

  Following the example on the r.topidx man page I ran the two following
commands:

first, make sure the region is set properly with
g.region rast=aberDEM -p

if cells in house_catchment outside the catchment of interest are NULL, you can do

g.region zoom=house_catchment
g.region align=aberDEM

to reduce the region and thus computational time and memory requirements before running r.mapcalc and r.topidx

r.mapcalc "house_elev = if (isnull(aberDEM), aberDEM, house_catchment)"

doesn't make sense to me, and does not correspond to the example in the man page. try
r.mapcalc "house_elev = if (isnull(house_catchment), null(), aberDEM)"

you need some elevation map as input for r.topidx, house_elev will now be a masked raster elevation map, if cells in house_catchment outside the catchment of interest are NULL. if they are e.g. zero, the command would be
r.mapcalc "house_elev = if (house_catchment == 0, null(), aberDEM)"

if cells in house_catchment outside the catchment of interest are NULL, you could also
g.copy rast=house_catchment,MASK

or if cells in house_catchment outside the catchment of interest are something else than NULL, you could do
r.mapcalc "MASK = if(house_catchment == <my_mask_value>, null(), 1)"

and now run r.topidx

obviously all this only works if aberDEM covers at least some parts of the catchment of interest in house_catchment

r.topidx in=house_elev out=house_tci

  I can find no output. house_tci does not display in a monitor, running
r.stats -Anc house_tci out=house_stats
produced an empty file, and so did
r.reports house_tci

  What have I missed here that I find no output at tall?

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Thu, 11 Feb 2010, Markus Neteler wrote:

here please run
r.univar house_elev
to check for the map statistics.

Markus,

   I have a map from running r.terraflow and had the masked map from
r.water.outlet, so I didn't need to run r.topidx. I also didn't need to run
the r.mapcalc command on the bottom of the man page as I already have that
mask.

   Anyway, recognizing that the topographic index is dimensionless and
probably sensitive to unmeasured variables in my project area, is there
anything I can infer from the map and the statistics?

   The results of r.univar are:

total null and non-null cells: 110694756
total null cells: 148468

Of the non-null cells:
----------------------
n: 110546288
minimum: 0.381453
maximum: 20.1172
range: 19.7357
mean: 4.82972
mean of absolute values: 4.82972
standard deviation: 1.89492
variance: 3.59074
variation coefficient: 39.2347 %
sum: 533907122.1373398304

and a jpeg image of the area of interest is attached. Specifically, the area
around the uppermost triangle is important. I see that the TCI values are
high along the stream channel leading there and low to the north, west, and
south. Can I say anything intelligent about the wetness index around that
triangle based only on this map?

Thanks,

Rich