[GRASS-user] how to calculate area of voronoi polygons considering
the boundary of the catchment
Micha Silver
micha at arava.co.il
Tue Sep 1 02:36:32 EDT 2009
Hi Daljeet
daljeet wrote:
> Hi Micha,
>
> I could create isohyetal lines using the suggested steps:
>
>
... clipped...
>
> 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.58990
>
If I understand correctly, the zmax_int and zmin_int are the max and min
displacements of the interpolated values vs. the actual data points. The
RST method creates an interpolation which does not usually go thru the
actual data points, but rather "smooths" over them. These numbers show
the drift above and below actual data points. So you have one point
where the interpolated rainfall is 13 mm (or whatever the rain units
are) below the actual data, and one point where the interpolation is 52
mm above.
> 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?
>
Well I can think of two approaches to this.
1- Using vectors: You might try to convert the isolines to closed
boundaries, then add centroids and find some way to get the rainfall
values into the centroids. This would require first to create an "edge"
line all around the region (v.in.region will do this) to close the ends
of the isolines, then run v.clean with the "break" tool to get nodes
where each contour line crosses this region line. Then you should be
able to convert the lines to closed boundaries (v.type) and finally
v.centroids to create centroids in each of the resulting strips between
isohyetal lines.
But this procedure looks way to convoluted to me. Instead maybe you
could try:
2- Using rasters: You already have the rainfall raster. Perhaps create
a reclass raster map of the rainfall raster using discrete values
instead of the continuous range. So your reclass rules would look
something like:
0 thru 20 = 10
21 thru 40 = 30
41 thru 60 = 50
...
This will group together all values in the interval between 0-20 and
give them the value midway between, etc. Then you could do r.to.vect
fea=area to create a vector map, and finally v.db.addtable and v.to.db
to get the areas of each strip into the vector attribute table. (Note
that r.reclass requires an integer raster)
After that long-winded response, I should add one more comment: Rainfall
is not a continuous phenomena across a geographic area. There's no
reason to expect that between the 40 mm line and the 60 mm line the
average rainfall is 50 mm. If you stay with the original, continuous
rainfall raster, and use v.rast.stats then the statistics are totalled
on a cell by cell basis, and you avoid the "unnatural" results that
might pop up when forcing the data into a framework of arbitrary intervals.
Regards,
Micha
>
More information about the grass-user
mailing list