[GRASS-user] Re: vector operations based on rasters
daniel.victoria at gmail.com
Fri Sep 26 07:43:55 EDT 2008
How about v.rast.stats
It will calculate raster univariate statistics for each vector polygon
On Thu, Sep 25, 2008 at 7:53 PM, Tim Michelsen
<timmichelsen at gmx-topmail.de> wrote:
> thanks for your help. but this is not all that I was looking for.
>>> Basically, I'd like to run v.extract/v.overlay not on a
>>> vector-to-vector basis but on a vector-to-raster basis.
>> g.region rast=dem_name
>> v.in.region dem_box
>> then v.overlay or v.select, depending on if you want to want to clip
>> touching vector areas at the bound or not.
> => With your tip I am just creating a boundary vector with the region
> But my raster has been created by mapcalc:
> 1. I created the raster like this:
> (elev => SRTM DEM)
> r.mapcalc "myraster=if(elev < 1000,elev, null())
> => now I have a huge (by area) raster which contains cell values in floating
> => The raster now has areas with NULL values because the terrain elevation
> is above 1000 m.
> 2. now I have the vector
> landcover: Global Land Cover 2000
> Now I would like the polygons from the landcover, which are situated below
> How can I achieve this?
> My idea:
> a) simplify the raster because the raster is too complex for data type
> r.mapcalc "myraster_simple=if(myraster,1, null())
> b) convert to vector:
> r.to.vect -s in=myraster_simple out=myraster_simple
> c) run v.overlay.
> Is there a simplier and more efficient approach?
> How do I also extract those areas of the raster which intersect with certain
> landuse types?
> Thanks and kind regards,
> grass-user mailing list
> grass-user at lists.osgeo.org
More information about the grass-user