Hi -
I'm trying to do something I thought was fairly simple, but eludes me...
I'm trying to find the average elevation of polygons. I used
gdal_rasterize to make a layer, which does indeed have unique categories,
and values, for each building.
I'm trying to use this layer against a DEM, and on a per-polygon basis,
get the min/max of the DEM ... I was thinking that somehow I might use
r.statistics, but....not so straightforward, apparently.
thanks in advance for any suggestions!
Chris
p.s. - it would sure be nice if I could make key/value pairs within
mapcalc; that way I could read a category from one layer, make a key, and
fetch it anywhere within mapcalc...
On Mon, 2008-03-10 at 15:50 -0700, cgnicholas@alamedanet.net wrote:
Hi -
Hi Chris!
I'm trying to do something I thought was fairly simple, but eludes me...
it took me a while till I understand how to do what other people told
me... on a similar problem. But since then I know where to look at
least 
I'm trying to find the average elevation of polygons.
Try with v.rast.stats
or with
"starspan" which is created to handle raster vs vector statistical
problems like the one you have. Have a look at the user guide of it:
http://starspan.casil.ucdavis.edu/doku/doku.php?id=userguide
I used
gdal_rasterize to make a layer, which does indeed have unique categories,
and values, for each building.
I'm trying to use this layer against a DEM, and on a per-polygon basis,
get the min/max of the DEM ... I was thinking that somehow I might use
r.statistics, but....not so straightforward, apparently.
thanks in advance for any suggestions!
Chris
Cheers,
Nikos
p.s. - it would sure be nice if I could make key/value pairs within
mapcalc; that way I could read a category from one layer, make a key, and
fetch it anywhere within mapcalc...
I don't understand here.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
Try with v.rast.stats
exactly what I was looking for; thanks! (it is slowly crunching away...);
looks like it is a wrapper around successive r.mapcalc runs?
Have a look at the user guide of it:
http://starspan.casil.ucdavis.edu/doku/doku.php?id=userguide
Looks very cool! I'll admit in advance my response to the following might
be completely lame by comparison...
p.s. - it would sure be nice if I could make key/value pairs within
mapcalc; that way I could read a category from one layer, make a key,
and fetch it anywhere within mapcalc...
I don't understand here.
Just thinking if mapcalc, instead of just defining new map layers
(A=foo@mapset1...) you might use one layer as a Key for intermediate,
category-based running results in memory...but again, I will look at
starspan...thanks!
Chris