Re: [GRASS-user] Tessellation of a set of polygons

2014-02-27 Thread Thomas Leduc
Yes indeed Markus, tessellation's problem disappears if import is forced to
2D (with v.in.ogr -2).
Thanks for your answer.

Thomas

PS: A workaround solution would have been to produce first internal buffers
of areas (with negative distance, i.e. v.buffer distance=-.25 type=area)


On Thu, Feb 27, 2014 at 1:58 PM, Markus Metz
wrote:

> On Thu, Feb 27, 2014 at 1:03 PM, Moritz Lennert
>  wrote:
> > On 27/02/14 11:58, Thomas Leduc wrote:
> >>
> >> Thanks a lot for your concern. Please find enclosed the corresponding
> >> .prj file.
> >
> >
> > I don't have time to look into this any further right now, but the
> import of
> > the file reports a series of topological errors. You might want to check
> on
> > those, first.
>
> The shapefile is 3D. The topological errors disappear if the import is
> forced to 2D with v.in.ogr -2. The tesselation is only 2D anyway.
>
> Markus M
>
> >
> >
> > Moritz
> >
> > ___
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
Thomas LEDUC
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Tessellation of a set of polygons

2014-02-27 Thread Markus Metz
On Thu, Feb 27, 2014 at 1:03 PM, Moritz Lennert
 wrote:
> On 27/02/14 11:58, Thomas Leduc wrote:
>>
>> Thanks a lot for your concern. Please find enclosed the corresponding
>> .prj file.
>
>
> I don't have time to look into this any further right now, but the import of
> the file reports a series of topological errors. You might want to check on
> those, first.

The shapefile is 3D. The topological errors disappear if the import is
forced to 2D with v.in.ogr -2. The tesselation is only 2D anyway.

Markus M

>
>
> Moritz
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Tessellation of a set of polygons

2014-02-27 Thread Moritz Lennert

On 27/02/14 11:58, Thomas Leduc wrote:

Thanks a lot for your concern. Please find enclosed the corresponding
.prj file.


I don't have time to look into this any further right now, but the 
import of the file reports a series of topological errors. You might 
want to check on those, first.


Moritz

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Tessellation of a set of polygons

2014-02-27 Thread Thomas Leduc
Thanks a lot for your concern. Please find enclosed the corresponding .prj
file.

Regards,


On Thu, Feb 27, 2014 at 10:09 AM, Moritz Lennert <
mlenn...@club.worldonline.be> wrote:

> On 25/02/14 17:54, Thomas Leduc wrote:
>
>> Dear GRASS-users & developpers,
>>
>> As summed up below, I've tried to tessellate the enclosed datasource (a
>> shapefile
>>
>
> It would help if you gave us the projection info for that dataset.
>
> Moritz
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
Thomas LEDUC


buildings_bdt.prj
Description: application/esri-crs
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Tessellation of a set of polygons

2014-02-27 Thread Moritz Lennert

On 25/02/14 17:54, Thomas Leduc wrote:

Dear GRASS-users & developpers,

As summed up below, I've tried to tessellate the enclosed datasource (a
shapefile


It would help if you gave us the projection info for that dataset.

Moritz

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Tessellation of a set of polygons

2014-02-25 Thread Lyle E. Browning
I've used Theissen/Voroni polygons but tessellation is new to me, not 
surprising given my state of knowledge so I would appreciate how it differs 
from T/V polygons for my edification.

Thanks in advance,

Lyle Browning


On Feb 25, 2014, at 11:54 AM, Thomas Leduc  wrote:

> Dear GRASS-users & developpers,
> 
> As summed up below, I've tried to tessellate the enclosed datasource (a 
> shapefile composed of several building footprints) using 2 different 
> approaches:
> 
>   g.remove vect=buildings,plots rast=buildings_r,plots_r
>   v.in.ogr -o dsn=/tmp/buildings.shp output=buildings
> 
> 1st method:
>   v.voronoi -a --overwrite input=buildings output=vor smoothness=0.15
>   v.out.ogr --overwrite input=vor type=area dsn=/tmp/src olayer=vor 
> layer=1 format=ESRI_Shapefile
> 
> 2nd method:
>   g.region vect=buildings nsres=0.25 ewres=0.25
>   v.to.rast --overwrite input=buildings output=buildings_r use=attr 
> attrcolumn=gid
>   r.grow --overwrite input=buildings_r output=plots_r metric=euclidean 
> radius=4800
>   r.to.vect --o input=plots_r output=plots type=area
>   v.out.ogr --o input=plots type=area dsn=/tmp/src olayer=plots layer=1 
> format=ESRI_Shapefile
> 
> As may be observed with the screenshot, (both) output results does not match 
> expectations.
> 
> Do you have any idea of the reason why it's wrong?
> 
> Many thanks for your help,
> 
> Thomas
> 
> 
> 
> 
> 
> On Tue, Sep 10, 2013 at 3:10 PM, Thomas Leduc  
> wrote:
> Dear Markus,
> 
> Impressive responsiveness. Thanks for the dedicated development. 
> http://trac.osgeo.org/grass/changeset/57621 is fully operative on the given 
> dataset.
> 
> It took me some time to test it, because I'm a complete newby with GRASS 
> community. Just to keep it written somewhere, I first had to checkout, 
> configure, compile, and install GRASS7 snapshot on my Debian 6.0.7:
> 
> svn checkout https://svn.osgeo.org/grass/grass/trunk grass7_trunk
> cd ./grass7_trunk
> ./configure --enable-64bit -with-freetype-includes=/usr/include/freetype2 
> --prefix=/usr/local/misc/grass7-snapshot --with-sqlite
> make
> make install
> 
> Then, in the GRASS console, I've copied and pasted the following instructions:
> 
> g.remove vect=buildings,vor
> v.in.ogr -o dsn=/tmp/src/src.shp output=buildings
> v.voronoi -a --overwrite input=buildings output=vor segment=0.15
> v.out.ogr --overwrite input=vor type=area dsn=/tmp/src olayer=vor layer=1 
> format=ESRI_Shapefile
> 
> Many thanks once again.
> 
> Thomas
> 
> 
> On Sun, Sep 8, 2013 at 7:49 PM, Markus Metz  
> wrote:
> On Thu, Aug 29, 2013 at 5:38 PM, 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.
> >
> 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.d

Re: [GRASS-user] Tessellation of a set of polygons

2013-09-16 Thread Thomas Leduc
Dear Hamish,

Yes indeed, the following script produces some equivalent result (but as
explained before, this is not the solution I used):

g.remove vect=buildings,plots rast=buildings_r,plots_r
 v.in.ogr dsn=/tmp/src/src.shp output=buildings
g.region vect=buildings nsres=0.25 ewres=0.25
v.to.rast --overwrite input=buildings output=buildings_r use=attr
attrcolumn=gid
r.grow --overwrite input=buildings_r output=plots_r metric=euclidean
radius=120
r.to.vect --o input=plots_r output=plots type=area
v.out.ogr --o input=plots type=area dsn=/tmp/src olayer=plots layer=1
format=ESRI_Shapefile


On Wed, Sep 11, 2013 at 1:02 AM, Hamish  wrote:

> Thomas wrote:
>
> >>  Let's consider a set of input polygons (represented by dark gray
> polygonal
> >>  footprints in the enclosed screenshot [1]).
> > ...
> >>  [1] this screenshot of about 11 KB is also downloadable at
> >>  https://dl.dropboxusercontent.com/u/8846569/tessellation.png
> >
> MarkusN:
> > just curious (given that GRASS GIS 7 now offers this functionality),
> > with which GIS software did you create your example?
>
> To make a guess I'd say it looks like v.to.rast + r.grow + r.to.vect.
> (note the gridding artifacts)
>
>
> Hamish
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
Thomas LEDUC
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Tessellation of a set of polygons

2013-09-16 Thread Thomas Leduc
Hi Markus,

I've produced the screenshot using Gearscape 0.2b4 (
http://gearscape.fergonco.es/index.php/downloads/2 - Thanks to Fernando
Gonzalez Cortes) and a small dedicated development that I've written in
Java. This implementation is based on JTS library (in particular,
SpatialIndex and Polygonizer classes), and it starts by a rasterization of
the set of input polygons.

Regards,

Thomas


On Tue, Sep 10, 2013 at 9:41 PM, Markus Neteler  wrote:

> Hi Thomas,
>
> On Thu, Aug 29, 2013 at 5:38 PM, Thomas Leduc
>  wrote:
> > Let's consider a set of input polygons (represented by dark gray
> polygonal
> > footprints in the enclosed screenshot [1]).
> ...
> > [1] this screenshot of about 11 KB is also downloadable at
> > https://dl.dropboxusercontent.com/u/8846569/tessellation.png
>
>
> just curious (given that GRASS GIS 7 now offers this functionality),
> with which GIS software did you create your example?
>
> best,
> markusN
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
Thomas LEDUC
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Tessellation of a set of polygons

2013-09-10 Thread Markus Neteler
Hi Thomas,

On Thu, Aug 29, 2013 at 5:38 PM, Thomas Leduc
 wrote:
> Let's consider a set of input polygons (represented by dark gray polygonal
> footprints in the enclosed screenshot [1]).
...
> [1] this screenshot of about 11 KB is also downloadable at
> https://dl.dropboxusercontent.com/u/8846569/tessellation.png


just curious (given that GRASS GIS 7 now offers this functionality),
with which GIS software did you create your example?

best,
markusN
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Tessellation of a set of polygons

2013-09-10 Thread Hamish
Thomas wrote:

>>  Let's consider a set of input polygons (represented by dark gray polygonal
>>  footprints in the enclosed screenshot [1]).
> ...
>>  [1] this screenshot of about 11 KB is also downloadable at
>>  https://dl.dropboxusercontent.com/u/8846569/tessellation.png
> 
MarkusN:
> just curious (given that GRASS GIS 7 now offers this functionality),
> with which GIS software did you create your example?

To make a guess I'd say it looks like v.to.rast + r.grow + r.to.vect.
(note the gridding artifacts)


Hamish

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Tessellation of a set of polygons

2013-09-10 Thread Thomas Leduc
Dear Markus,

Impressive responsiveness. Thanks for the dedicated development.
http://trac.osgeo.org/grass/changeset/57621 is fully operative on the given
dataset.

It took me some time to test it, because I'm a complete newby with GRASS
community. Just to keep it written somewhere, I first had to checkout,
configure, compile, and install GRASS7 snapshot on my Debian 6.0.7:

svn checkout https://svn.osgeo.org/grass/grass/trunk grass7_trunk
cd ./grass7_trunk
./configure --enable-64bit
-with-freetype-includes=/usr/include/freetype2
--prefix=/usr/local/misc/grass7-snapshot --with-sqlite
make
make install

Then, in the GRASS console, I've copied and pasted the following
instructions:

g.remove vect=buildings,vor
  v.in.ogr -o dsn=/tmp/src/src.shp output=buildings
  v.voronoi -a --overwrite input=buildings output=vor segment=0.15
  v.out.ogr --overwrite input=vor type=area dsn=/tmp/src olayer=vor layer=1
format=ESRI_Shapefile

Many thanks once again.

Thomas


On Sun, Sep 8, 2013 at 7:49 PM, Markus Metz
wrote:

> On Thu, Aug 29, 2013 at 5:38 PM, 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.
> >
> 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@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
Thomas LEDUC
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Tessellation of a set of polygons

2013-09-09 Thread Markus Metz
On Mon, Sep 9, 2013 at 4:23 PM, Thomas Leduc
 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
>  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@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
>
>
> --
> Thomas LEDUC
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Tessellation of a set of polygons

2013-09-08 Thread Markus Metz
On Thu, Aug 29, 2013 at 5:38 PM, 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.
>
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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Tessellation of a set of polygons

2013-09-02 Thread Moritz Lennert

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Tessellation of a set of polygons

2013-08-29 Thread Thomas Leduc
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.

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user