0

I am working with r.stats. My analysis is about overlap Extreme Climatic Events (ECE) raster map with mammals range maps. I used to do my analysis first creating r.mask on ECE map and then applying r.stats to raster range map for single animal. I discovered I cannot use raster maps for resolution matters, so I have available only vector range maps. It means I have to invert the process and do my statistics on ECE map: so first selecting the region/mask to work on, e.g. the vector range map, and the apply r.stats on ECE raster map.

As r.mask is only usable for rasters, should I then use g.region for vector range maps? Would it work the same?

1
  • I cannot understand the part "I discovered I cannot use raster maps for resolution matters, so I have available only vector range maps". Do you mean you cannot use the raster data because of the resolution? If Micha on his answer got your problem right, then please indicate if it is solved. If you are asking about the r.mask functionality with vectors, actually you can use a vector layer as a mask from the r.mask tool. – Hasnein Tareque Jan 25 at 1:00
1

You actually don't need an analogous of r.mask for vectors for your task. r.stats is a command for rasters (that's what the "r." means), so it will only work within the mask, if you created one. If you want to clip the vector then you could use g.region -> v.in.region and then use the created vector to clip the one of interest.

1

It's not clear what you are asking. If I understand correctly, you have a raster of Extreme Climate Events, and a vector polygon map of animal habitat ranges. And your goal is to extract statistics from the ECE raster for each polygon in the ranges vector. If this is correct, then you probably want to look at the v.rast.stats module. The manual page is here. Yu can get maximum, minimum, mean, std. dev. and other statistics from the raster map, for each polygon separately.

You will need to set the region, using g.region. You can use the polygon vector map to set the region. i.e.

g.region -p vect=<your ranges polygon vector map>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.