[GRASS-user] how to calculate area of voronoi polygons considering the boundary of the catchment

daljeet sachdev_dj at yahoo.com
Mon Aug 31 15:52:41 EDT 2009


Hi Micha,

I could create isohyetal lines using the suggested steps:

-v.in.ascii
v.in.ascii x=2 y=1 cat=0 input="01_08nov2001" out="rainvector" columns="x
double precision, y double precision, rain_info double precision" --o
fs="\t" skip=1

- set the region to smaller vector and set the mask created from the same
smaller region vector- this is to reduce the computation and work on smaller
region.

-v.surf.rst (without playing around with tension and smooothness)
v.surf.rst rainvector zcol=rain_info elev=rainraster --o

-r.contour
r.contour step=10 input=rainraster output=rainvector_con

-v.rast.stats
v.rast.stats rainvector_con raster=rainraster colprefix=pre

The generated image is like this
http://n2.nabble.com/file/n3555804/rainvector_con.png 

Following are the doubts/questions

1. I saw the details of the raster created from v.surf.rst

>r.info rainraster

zmin_data=0.000000, zmax_data=141.322000                                |
zmin_int=-13.588332, zmax_int=52.589905 

zmin_data and zmax_data seems to be correct but I do not understand 
a) why the interpolated value zmin_int=-13.588332 is -ve
b) and what is meaning of zmax_int equal to  52.589905

2. The target is to be able to calculate the area between two isohyetal
lines and multiplying that area with the average rainfall within the two
isohyets. This is to be done for all isohyetal lines. 

Average can be calculated by averaging the value of rainfall of the two
isohyetal lines.

But how to calculate the area b/w the two isohyetal lines?

>v.db.select rainvector_con
cat|level|pre_n|pre_min|pre_max|pre_range|pre_mean|pre_stddev|pre_varian|pre_cf_var|pre_sum
1|0|722|-7.148755|1.627629|8.776384|-0.028756|0.424996|0.180621|-1477.946779|-20.761703
2|10|820|0.515458|13.074255|12.558797|10.01766|0.67391|0.454155|6.727224|8214.481322
3|20|557|10.988949|23.001575|12.012627|19.92515|0.938034|0.879908|4.707789|11098.308486
4|30|341|19.780724|33.184017|13.403294|29.949896|1.289828|1.663655|4.306618|10212.914476
5|40|168|31.07769|42.131256|11.053566|39.848495|1.331978|1.774164|3.342605|6694.547157
6|50|13|44.652187|52.589905|7.937717|49.761042|1.654373|2.73695|3.324635|646.893547


Thanks
Daljeet


Micha Silver wrote:
> 
> On Tue, 28 Jul 2009 11:24:19 -0700 (PDT)
> daljeet <sachdev_dj at yahoo.com> wrote:
> 
>> 
>> 
>> 
>> //d.vect Ind_rain_orig
>> //The  Ind_rain_orig looks like this - when the region is set to
>> vector of Kerala
>> //g.region vect=ker_rain_v
>> 
>> http://n2.nabble.com/file/n3345107/Ind_rain_orig_reg_ker.png 
>> 
>> But when the region is set to Ind_adm2_v (whole  country) the image
>> is like //g.region vect=Ind_adm2_v
>> //d.vect Ind_rain_orig
>> 
>> http://n2.nabble.com/file/n3345107/Ind_rain_orig_reg_adm2.png 
>> 
> 
> Since you seem to have a rigid matrix of data points, what's the
> purpose of the voronoi polygons??
> Can't you just run v.surf.rst to get a rain_info raster surface, then
> r.contour to make your isohyetal lines? Finallly v.rast.stats will add
> columns to the vector table with all the rainfall statistics.
> 
> 
>  
>> Thanks
>> Daljeet
>> 
>> Moritz Lennert wrote:
>> > 
>> > On 28/07/09 18:42, daljeet wrote:
>> >> Hi Moritz,
>> >> 
>> >> I am new to GRASS and the basic concepts of this field. Below, I
>> >> tried my best to share all the information. Please write if I have
>> >> missed anything.
>> > 
>> > This is perfect, thanks !
>> > 
>> >> //creating the voronoi
>> >> v.voronoi input="Ind_rain_orig" output="Ind_rain_ker_vor"
>> >> 
>> >> //display the voronoi
>> >> d.vect "Ind_rain_ker_vor"
>> >> 
>> >> http://n2.nabble.com/file/n3344342/Ind_rain_ker_vor.png 
>> >> 
>> > 
>> > The problem is here, with v.voronoi, as you can see the white spots 
>> > here. What do the original points (Ind_rain_orig) look like ?
>> > 
>> > I don't know the module well enough, but I think you might have hit
>> > a bug there (I've just tried a simple example for myself and also
>> > get weird white spots). Please file a report in the bug tracker.
>> > 
>> > 
>> >> 
>> >> //storing the area of each polygon to a csv file
>> >> v.report ker_rain_vor_over option=area units=k >ker_area.csv --o
>> > 
>> > Note that you can use v.addcol and v.to.db upload the polygon areas
>> > to the attribute table.
>> > 
>> > Moritz
>> > _______________________________________________
>> > grass-user mailing list
>> > grass-user at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/grass-user
>> > 
>> > 
>> 
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> 

-- 
View this message in context: http://n2.nabble.com/how-to-calculate-area-of-voronoi-polygons-considering-the-boundary-of-the-catchment-tp3335923p3555804.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list