[GRASS5] a request to fix v.cutter bug

Thierry Laronde tlaronde at polynum.com
Thu Apr 1 14:13:22 EST 2004


FWIW, here is an explanation on how to work around the bugs in v.cutter.

1 - don't use the area option since it's the part that is "less"
finished (there are a bunch of TODO comments) => by combining several 
calls to the `line' part of v.cutter you can achieve the result;

2 - there are some bugs in v.cutter but there are other bugs in other
programs too, so the work around addresses several distinct problems.

Explanation:

a) Transform both the map `M' to be processed and the cutter map 
`C' so that there are only segments (I use David Hilbert's Grundlagen 
der Geometrie definitions) that is so:

	1. Every `line` is a 2 _distinct_ points entity => no polylines, no
	null length lines

	2. AB is the same as BA => orientate the segment so that it is 
	always described in the same point order (this will ease the 
	suppression of duplicate `lines'...)

b) cut M `lines' with C

c) cut C `lines' with M

d) merge the two resulting maps and clean them 
(suppress null lines and duplicates)

=> You will end with a complete result where you can built the areas.

Giving back the original attributes to the child areas is just a matter
of finding (in 5.0/5.3 with v.what) in which original area lies the 
new centroid.

Cheers,
-- 
Thierry Laronde (Alceste) <tlaronde at polynum.org>
http://www.kergis.org/  |   http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C




More information about the grass-dev mailing list