[GRASS-user] min and max raster within polygons

Dave Roberts droberts at montana.edu
Sun Nov 20 15:54:01 PST 2016


Thanks Anna.  Wow, only two lines of code!

v.to.rast inp=new_mountains out=new_mountains attr=cat use=attr
r.univar map=srtm zones=new_mountains

Thanks, Dave


On 11/20/16 13:20, Anna Petrášová wrote:
> On Sun, Nov 20, 2016 at 3:12 PM, Dave Roberts <droberts at montana.edu> wrote:
>> Friends,
>>
>>    I have succeeded (finally) in heads-up digitizing the mountain ranges of
>> the Rocky Mountains.  Now I want to know the minimum and maximum elevation
>> for each range.  I have a suitable DEM, but I cannot figure out a
>> combination or r.mapcalc or other that will give me this.
>
> I would probably use r.univar with zones option. You have to first
> rasterize your vector of ranges.
>
> https://grass.osgeo.org/grass73/manuals/r.univar.html
>
> Anna
>
>>
>>    Clearly, what I want is to query a raster within a boundary, not at a
>> point.
>>
>> Thanks, Dave
>> --
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>

-- 



More information about the grass-user mailing list