[GRASS-user] Presence/Absence error

Hamish hamish_nospam at yahoo.com
Wed Sep 13 04:21:58 EDT 2006


Joel Pitt wrote:
> I have a raster map that indicates the predicted area of where a
> species exists, plus a vector map of points where the species has
> actually been recorded.
> 
> I'm trying to work out a simple method for working out the number of
> correctly predicted occurences (where the vector points overlap with
> non-null cells in the raster), the number of false positives (where a
> non-null raster cell exists but no vector point), the number of false
> negatives (where the point exists but raster cell is null), and the
> number of correct negatives (the raster cell is null and no point
> exists).

v.out.ascii | tr '|' ' ' | r.what

(I just updated the help page in CVS; may take a day or 2 to hit the web)

pipe that to "| grep '*'" or "| grep -v '*'" to filter hits or misses.

use v.to.rast + r.mapcalc to find cells which don't contain a vector
point (or r.what + r.in.xyz). Use r.stats to total up results or
perhaps make a cover map of all "1" and use r.univar's "sum" to get
total number of cells. (or easier just "n" of null & non-null cells
directly from v.to.rast map)


see also v.what.rast -
  Uploads raster values at positions of vector points to the table


> If possible I would like to get a list of the raster values in each of
> the above categories, since the map is one of probabilities (So in the
> above discussion the "null" raster cells have probability values but I
> use mapcalc to cut-off values less then a given threshold.
> 
> Any help would be appreciated. I'm trying to look for a pretty
> efficient method since this needs to be done thousands of times - but
> any suggestion would be helpful.

No worries, all the above commands are fully scriptable.


good luck,
Hamish




More information about the grass-user mailing list