[GRASS-user] elevation values of watershed basins

temiz temiz at deprem.gov.tr
Thu Feb 1 11:27:49 EST 2007

Dylan Beaudette wrote:
> On Wednesday 31 January 2007 05:14, Markus Neteler wrote:
>> temiz wrote on 01/31/2007 06:53 PM:
>>> hello
>>> Can you make a suggestion about how I can find the highest and lowest
>>> elevation points of all watershed basins
>>> as vector points ?
>>> I mean, I have watershed map as vector. I need it's table includes
>>> like "cat", "highest elevation value", "lowest elevation value"
>>> How can I do that ?
>> If I understand your question correctly, you can do this easily with
>> v.rast.stats
>> Description:
>>  Calculates univariate statistics from a GRASS raster map based on
>> vector objects
>> The help page contains a similar example.
>> cheers
>> Markus
> If you have problems with this approach (no reason to suspect problems), I 
> have found that 'starspan' coupled with GRASS to be an excellent 
> raster+vector reporting tool.
> main idea:
> start grass
> starspan --vector location/mapset/vector/yourvector \
> --raster location/mapset/cellhd/your_raster \
> --stats output.csv min max avg mode (...)
> Output is saved to a CSV file, not quite as nice as v.rast.stats saving 
> results back to the attribute table though... The nice thing about this 
> approach is that the raster and vector sources can be any GDAL-readable data 
> type. For example, I use starspan to compute raster statistics within a given 
> radius of a set of points. The raster files are all stored in GRASS, and the 
> points are stored in PostGIS.
> Cheers,

/*thank you

/*I have never met  */starspan so far. I am looking at its home page and 
it will certain to be very useful.
I will work on it.

As I see, you are a soil scientist, so you will understand me better.

The logic of my question is based on finding slopes' length as landslide 
susceptibility parameter ( I accept slope is waterhed area).

Firstly, I used PostGis's extent function and got width and length of 
polygons (say watershed or  landslide as polygon). But this
polygon's longest dimension doesn't fit dimension in downslope 
direction, which is the slope length I am looking for. So, if I found 
max and min values of elevation of the polygons, I could calculate 
slopes' length.

/*v.rast.stats */gives max and min values of elevation of the polygons( 
/*v.rast.stats*/ has  still been running for most 20 hours).
maybe from these values I generate vector points containing min & max 
values .

I will appreciate if you supply your ideas and recommendations



Ahmet Temiz

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the grass-user mailing list