Opened 9 years ago

Last modified 4 years ago

#2670 new defect

v.voronoi skeleton: nonsense result with many adjacent polygons

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Default Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

v.voronoi -s census_wake2000 out=census_skel

The output is nonsense (see attached image).

I can get more sensible results (see second image) with:

for cat in $(v.category census_wake2000 op=print); do v.extract census_wake2000 cat=$cat out=census$cat; g.region vect=census$cat; v.voronoi -s census$cat out=skel$cat; done; v.patch $(g.list vect pat="skel*" sep=,) out=census_skel_patched --o

How difficult would it be to integrate such a loop into v.voronoi to ensure more useful centerlines ?

Attachments (5)

v_voronoi_allpolystogether.png (119.4 KB ) - added by mlennert 9 years ago.
all polygons in one go
v_voronoi_polybypoly.png (133.8 KB ) - added by mlennert 9 years ago.
polygon by polygon through loop
lake_without_loop.png (78.9 KB ) - added by sbl 8 years ago.
Lake skeleton produced by v.voronoi -s on the entire set of (a little more than 1350) lakes…
lake_in_loop_non_generalized.png (34.2 KB ) - added by sbl 8 years ago.
Lake skeleton produced by v.voronoi on a single, relatively complex lake…
lake_in_loop_generalized.png (26.7 KB ) - added by sbl 8 years ago.
Lake skeleton produced by v.voronoi -s on a single lake which was generalized with douglas_reduction in advance…

Download all attachments as: .zip

Change History (20)

by mlennert, 9 years ago

all polygons in one go

by mlennert, 9 years ago

Attachment: v_voronoi_polybypoly.png added

polygon by polygon through loop

comment:1 by neteler, 9 years ago

Milestone: 7.0.17.0.2

Ticket retargeted after 7.0.1 milestone closed

comment:2 by sbl, 8 years ago

I can second that.

I tried v.voronoi -s on both a set of isolated lake and valley polygons. There using a loop helped, but results were not very promising never the less, esp. for relatively complex polygons with many vertices. See e.g. how the centerline is routed around islands...

So I tried to generalize the polygons in advance. That improved the results in areas where vertex density was high but led to unuseful results where vertex density was low (within one polygon)...

by sbl, 8 years ago

Attachment: lake_without_loop.png added

Lake skeleton produced by v.voronoi -s on the entire set of (a little more than 1350) lakes...

by sbl, 8 years ago

Lake skeleton produced by v.voronoi on a single, relatively complex lake...

by sbl, 8 years ago

Lake skeleton produced by v.voronoi -s on a single lake which was generalized with douglas_reduction in advance...

comment:3 by neteler, 8 years ago

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:4 by neteler, 8 years ago

Milestone: 7.0.3

Ticket retargeted after milestone closed

comment:5 by neteler, 8 years ago

Milestone: 7.0.4

Ticket retargeted after 7.0.3 milestone closed

comment:6 by martinl, 8 years ago

Milestone: 7.0.47.0.5

comment:7 by neteler, 7 years ago

Milestone: 7.0.57.0.6

comment:8 by neteler, 6 years ago

Milestone: 7.0.67.0.7

comment:9 by martinl, 5 years ago

With GRASS 7.6.0 I am getting

v.voronoi -s census_wake2000 out=census_skel
Reading features...
ERROR: Found 0 vertices in <census_wake2000@PERMANENT>, but at least 2 are
       needed

?

comment:10 by mlennert, 5 years ago

Milestone: 7.0.77.8.0

Moving this on to milestone 7.8, but not sure if this is really fixable.

MarkusM, should this be a no fix ?

in reply to:  10 comment:11 by mmetz, 5 years ago

Replying to martinl:

With GRASS 7.6.0 I am getting

v.voronoi -s census_wake2000 out=census_skel
Reading features...
ERROR: Found 0 vertices in <census_wake2000@PERMANENT>, but at least 2 are
       needed

?

From the manual: "The bounds of the output map are limited by the current region (see g.region)."

Then you get no error but nonsense results.

Replying to mlennert:

Moving this on to milestone 7.8, but not sure if this is really fixable.

MarkusM, should this be a no fix ?

Not sure, v.voronoi generally suffers from numerical instability. Previously, I could improve it a bit, but it's not perfect, but I have one more idea (maybe in the next few weeks I find time to try this idea: scale coordinates to region center).

Furtheron, something seems to be conceptually wrong with the skeletons for adjacent areas, that should be fixable.

comment:12 by neteler, 5 years ago

Milestone: 7.8.07.8.1

Ticket retargeted after milestone closed

comment:13 by neteler, 4 years ago

Milestone: 7.8.17.8.2

Ticket retargeted after milestone closed

comment:14 by neteler, 4 years ago

Milestone: 7.8.2

Ticket retargeted after milestone closed

comment:15 by neteler, 4 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.