[GRASS-dev] How to create union of areas with isles

Hi,

I'm almost done with the new v.buffer module, but I need some help to finish it.
I have the following problem. Suppose we have several line_pnts
structs: A0, A1, A2, ...., An; B0, B1, B2, ..., Bm; ... (All lines are
not self-intersecting) Here A0, B0, ... represent outer contours of
areas and A1...An, B1, ... Bm, .... represent the corresponding isles
(and no two isles A1...An intersect each other, and no isle of A1...An
intersects A0. I.e. we have nice areas). How to create the map which
consists of the union of those areas A,B,... (Most of the times
A,B,... will intersect each other)
I have attached an example of such area - A with outer line A0, and
isles A1, A2.

Impatiently,
Rosen Matev

(attachments)

drawing.svg

And here is png version for convenience

(attachments)

drawing.PNG

On 09.08.2008 23:35, ??? ??? wrote:

Hi,

I'm almost done with the new v.buffer module, but I need some help to finish it.
I have the following problem. Suppose we have several line_pnts
structs: A0, A1, A2, ...., An; B0, B1, B2, ..., Bm; ... (All lines are
not self-intersecting) Here A0, B0, ... represent outer contours of
areas and A1...An, B1, ... Bm, .... represent the corresponding isles
(and no two isles A1...An intersect each other, and no isle of A1...An
intersects A0. I.e. we have nice areas). How to create the map which
consists of the union of those areas A,B,... (Most of the times
A,B,... will intersect each other)
I have attached an example of such area - A with outer line A0, and
isles A1, A2.

Hmm the old v.buffer seems to work it so that it creates a line consisting of all points including the islands (note that island points are listed counter-clockwise). This will create bridges to the islands. Those are removed with a call to Vect_remove_bridges(); so I guess you don't need to worry about them.

Markus, Glynn, Hamish, is that right? Is there no way to create islands without creating bridges?

--Wolf

--

<:3 )---- Wolf Bergenheim ----( 8:>

Росен Матев wrote:

I'm almost done with the new v.buffer module, but I
need some help to finish it.
I have the following problem. Suppose we have several
line_pnts structs:

....

I.e. we have nice areas). How to create the map which
consists of the union of those areas A,B,... (Most of the
times A,B,... will intersect each other)

can you reuse v.overlay code for that?

i.e. if you pass A and B into "v.overlay opt=or" do you get the
result you want? islands should be respected that way.

Hamish

I came up with something similar to v.overlay and the old buffer
module. I'm only concerned that it might be slow but I think we can
use a spatial index to improve it alot

On Tue, Aug 12, 2008 at 10:23 AM, Hamish <hamish_b@yahoo.com> wrote:

Росен Матев wrote:

I'm almost done with the new v.buffer module, but I
need some help to finish it.
I have the following problem. Suppose we have several
line_pnts structs:

....

I.e. we have nice areas). How to create the map which
consists of the union of those areas A,B,... (Most of the
times A,B,... will intersect each other)

can you reuse v.overlay code for that?

i.e. if you pass A and B into "v.overlay opt=or" do you get the
result you want? islands should be respected that way.

Hamish

On 12/08/08 17:53, Росен Матев wrote:

I came up with something similar to v.overlay and the old buffer
module. I'm only concerned that it might be slow but I think we can
use a spatial index to improve it alot

This brings up the need to have permanent (file-based) spatial index, instead of only one built on-the-fly.
Another important ToDo:
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/doc/vector/TODO?rev=HEAD&content-type=text/vnd.viewcvs-markup

Moritz

On Tue, Aug 12, 2008 at 10:39 PM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

On 12/08/08 17:53, Росен Матев wrote:

I came up with something similar to v.overlay and the old buffer
module. I'm only concerned that it might be slow but I think we can
use a spatial index to improve it alot

This brings up the need to have permanent (file-based) spatial index,
instead of only one built on-the-fly.
Another important ToDo:
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/doc/vector/TODO?rev=HEAD&content-type=text/vnd.viewcvs-markup

For an up-to-date version, see here:
http://trac.osgeo.org/grass/browser/grass/trunk/doc/vector/TODO

Markus

Absolutely agree that grass needs that. I might take this task after I
finish the buffer module (very soon).

2008/8/12 Markus Neteler <neteler@osgeo.org>:

On Tue, Aug 12, 2008 at 10:39 PM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

On 12/08/08 17:53, Росен Матев wrote:

I came up with something similar to v.overlay and the old buffer
module. I'm only concerned that it might be slow but I think we can
use a spatial index to improve it alot

This brings up the need to have permanent (file-based) spatial index,
instead of only one built on-the-fly.
Another important ToDo:
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/doc/vector/TODO?rev=HEAD&content-type=text/vnd.viewcvs-markup

For an up-to-date version, see here:
http://trac.osgeo.org/grass/browser/grass/trunk/doc/vector/TODO

Markus