[GRASS-user] Tessellation of a set of polygons

Markus Metz markus.metz.giswork at gmail.com
Sun Sep 8 10:49:20 PDT 2013


On Thu, Aug 29, 2013 at 5:38 PM, Thomas Leduc
<thomas.leduc at cerma.archi.fr> 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.
>
I have added tessellation of areas to v.voronoi in trunk r57621. You
need to use the new -a flag and can control the smoothness of the
output with the new segment option. With your example, segment=0.15
produces reasonably smooth output.

This implementation ignores shared boundaries (not present in your
example) which would need to be patched in afterwards. An alternative
would be to use v.overlay to obtain areas outside the original input
areas.

HTH,

Markus M

> Thanks a lot for any help/advice.
>
> Thomas Leduc
>
> PS: I'm aware there already exist in GRASS some functions such as
> "v.to.rast, r.grow.distance, and r.contour" which could help in building map
> of distances, and isocontours... I'm also aware there already exist
> "v.to.rast, r.thin, and r.to.vect feature=line" to build some sort of medial
> axis transform or skeleton.
>
> PPS: input data set
>
> create table b(gid int, the_geom GEOMETRY(POLYGON, 2D));
> insert into b values (0, GeomFromText('POLYGON ((0 0, 10 0, 10 10, 0 10, 0
> 0))'));
> insert into b values (1, GeomFromText('POLYGON ((30 0, 30 -30, 10 -30, 10
> -40, 40 -40, 40 0, 30 0))'));
> insert into b values (2, GeomFromText('POLYGON ((20 20, 100 20, 100 40, 60
> 40, 60 30, 40 30, 40 60, 20 60, 20 20))'));
> insert into b values (3, GeomFromText('POLYGON ((60 10, 60 -20, 100 -10, 100
> 10, 60 10))'));
> insert into b values (4, GeomFromText('POLYGON ((-10 -10, -10 -40, -40 -40,
> -40 -20, -60 -20, -60 0, -50 0, -50 -10, -10 -10))'));
> insert into b values (5, GeomFromText('POLYGON ((-40 20, -40 40, -10 40, -10
> 30, -20 20, -40 20))'));
>
> [1] this screenshot of about 11 KB is also downloadable at
> https://dl.dropboxusercontent.com/u/8846569/tessellation.png
>
>
> _______________________________________________
> 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