[GRASS-user] Tessellation of a set of polygons

Markus Metz markus.metz.giswork at gmail.com
Mon Sep 9 13:25:12 PDT 2013


On Mon, Sep 9, 2013 at 4:23 PM, Thomas Leduc
<thomas.leduc at cerma.archi.fr> wrote:
> Dear Moritz,
>
> Thanks a lot for your quick answer and sorry for my own "latency". Yes,
> indeed, the Medial Axis Transform (or Skeleton) of Polygons dataset can be
> computed via the Voronoi diagram of the corresponding set of points
> (discretizing the polygons boundaries). However, I assume that this is not a
> scalable solution with a huge set of polygons (insofar as the v.to.points
> resolution has to be of enough fine grain). I was thinking to a
> morphological thinning based solution... Maybe I'm wrong.

Can you elaborate on a morphological thinning based solution? Given
some references, it could be implemented.

>
> With GRASS GIS 6.4.0+42329, and the enclosed (small) dataset, the tessel.shp
> output file does not match expectations.

There are 3 known bugs in v.voronoi [0, 1, 2]. All have been fixed in
GRASS 7. That means as long as you use GRASS 6, results of v.voronoi
might be wrong. You are welcome to test GRASS 7 and push for the
backport of the relevant fixes;)

Markus M

[0] https://trac.osgeo.org/grass/ticket/957
[1] https://trac.osgeo.org/grass/ticket/1682
[2] https://trac.osgeo.org/grass/ticket/2019


> g.remove vect=buildings,newbuildings,vor,tessel
> v.in.ogr dsn=/tmp/src/src.shp output=buildings
> g.region vect=buildings
>
> v.category input=buildings output=newbuildings option=add type=boundary
> v.out.ogr input=newbuildings type=boundary dsn=/tmp/src olayer=build layer=1
> format=ESRI_Shapefile
>
> v.to.points -i --overwrite input=newbuildings output=newbuildings_pts
> dmax=0.1
> v.out.ogr input=newbuildings_pts type=point dsn=/tmp/src olayer=pts layer=1
> format=ESRI_Shapefile
> v.voronoi -l --overwrite input=newbuildings_pts output=vor
> v.out.ogr input=vor type=line dsn=/tmp/src olayer=vor layer=1
> format=ESRI_Shapefile
>
> v.dissolve input=vor output=tessel
>
> v.out.ogr input=tessel type=line dsn=/tmp/src olayer=tessel layer=1
> format=ESRI_Shapefile
>
> Thanks a lot once again for your help.
>
> Thomas Leduc
>
>
> On Mon, Sep 2, 2013 at 3:13 PM, Moritz Lennert
> <mlennert at club.worldonline.be> wrote:
>>
>> On 29/08/13 17:38, Thomas Leduc wrote:
>>>
>>> Let's consider a set of input polygons (represented by dark gray
>>> polygonal footprints in the enclosed screenshot [1]). I wonder whether
>>> there already exists a (set of) GRASS instructions to produce the
>>> "surrounding tessellation". I mean, could you please tell me how to
>>> compute the set of multicolor polygons in the enclosed screenshot?
>>>
>>> As an example, the blue polygon is the set of points that are:
>>>    - overlayed by the dark gray polygon labeled #1
>>>    - or closer to the dark gray polygon labeled #1 than to any other
>>> input polygon.
>>>
>>> Thanks a lot for any help/advice.
>>
>>
>> You could try the following workflow:
>>
>> - add category values to your boundaries (if that is important make them
>> equal to the cat values of your centroids, otherwise just using v.category
>> op=add type=boundary)
>> - use v.to.points to transform the boundaries to points (each point will
>> have the cat value of the corresponding boundary)
>> - v.voronoi to create voronoir diagrams for these points
>> - v.dissolve to disolve boundaries between polyons with the same category
>> numbers
>>
>> Moritz
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
>
> --
> Thomas LEDUC
>
> _______________________________________________
> 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