[GRASS-user] Re: voronoi for polygons

Martin Wegmann wegmann at biozentrum.uni-wuerzburg.de
Thu Aug 10 04:56:58 EDT 2006


Hello Martin,

On Wednesday 09 August 2006 17:22, Martin Rutzinger wrote:
> i'm not sure what is wrong with v.select, but i can show a second approach
> how to derive voronoi polygons (restriction: doesn't work for adjacent
> polygons):

thanks for your help, I tried your approach, but having polygons as input (not 
adjacent ones) and using them as base for voronoi  polygons between polygons, 
this approach does not work for me or I misunderstood you:

> - convert the selected polygons to raster (v.to.rast)
ok

> - switch null() values to 1 and pixels with values to null() (r.mapcalc)
it works for my base polygons, because they are not adjacent, but not for my 
voronoi polygons. I have no null() values because my voronoi polygons are 
adjacent and cover the whole location

> - thin raster (r.thin) several iterations
that does not work due to the previous problem, but how do you distinguish 
between voronoi polygons belonging to the same base polygon and vornoi 
polygons belonging to the base polygons in the neighbourhood? Extracting the 
border between two voronoi polygon groups (for 2 base polygons) would be 
interesting, but I have no idea how to tell GRASS which line that is. 

> - convert thinned raster to vector and make polygons (r.to.vect,...)

regards, Martin






> this works for me
> /martin
>
>
> ********************
> Hello,
>
> I want to calculate voronoi areas for polygons, but I am stuck in
> the "query-part".
>
> using spearfish data I did:
>
> v.extract input=fields at PERMANENT output=fields_extract list=41,36,46,21
>
> v.to.points input=fields_extract output=fields_extract_points type=boundary
>
> v.voronoi input=fields_extract_points output=fields_extract_points_voron
>
>
> now I wanted to
> - group all voronoi polygons which belong to points of one polygon (GIS
> query overlap)
> - calculate area of merged voronoi polygons and assign them to each
> original polygon
>
> but:
>
> v.select operator=overlap gives:
>
> v.select binput=fields_extract_points_voron_clean
> ainput=fields_extract_clean atype=area btype=area output=test
> operator=overlap
> Processing ainput areas ...
>  100%
> Writing attributes ...
> Layer 1
> v.select complete.
> Building topology ...
> 0 primitives registered
> 0 areas built
> 0 isles built
> Attaching islands:
> Attaching centroids: Topology was built.
> Number of nodes     :   0
> Number of primitives:   0
> Number of points    :   0
> Number of lines     :   0
> Number of boundaries:   0
> Number of centroids :   0
> Number of areas     :   0
> Number of isles     :   0
>
> anything wrong with the command?
> I did it as well without b/atype=area but same result.
>
> The problem how to calculate areas is not yet tackled ,-)
>
> I appreciate any hint, Martin
>
> ___________________________________________________________________________
>_____
>
> Mag. Martin Rutzinger
>
> rutzinger at alps-gmbh.com
> alpS - Natural Hazard Management
> http://www.alps-gmbh.com
>
> martin.rutzinger at uibk.ac.at
> Institute for Geography, University of Innsbruck
> http://geowww.uibk.ac.at




More information about the grass-user mailing list