[GRASS-dev] Re: [GRASS-user] v.clean tool=prune - 'thresh' interpreted wrong?

Maciej Sieczka tutey at o2.pl
Tue Oct 3 11:43:12 EDT 2006


Moritz Lennert wrote:

> http://freegis.org/cgi-bin/viewcvs.cgi/grass6/lib/vector/diglib/prune.c?rev=HEAD&content-type=text/vnd.viewcvs-markup
> 
> There is an explanation of the algorithm at the beginning.

Thanks, I should have looked into the source code first. My only (poor)
excuse is being a non-programmer and "mentally handicapped" due to my
disgraceful pre-Linux/FOSS times ;).

Moritz suggested that maybe "the threshold only applies in cases of
change of direction (i.e. angles)". Please note there is no any
reference to angles or direction in the code or comments. It seems the
threshold refers to distance only.

There is a following comment:

* thresh - the distance that a string must wander from a straight
*          line before another point is selected.

As I understand it, this means that if my vertcices are on a straight
line, at intervals of 10, only a thresh of 10 or more should prune
them. But, as you can see in my original example, any thresh>=0.03
prunes them. Do I missunderstand sthing (I'm not sure what the
"straight line" means here)?

So we have 2 possibilities:

1. If in opposite to my interpretation of the source and manual,
angles/directions DO have something to do with the pruning thresh,
please somebody knowledgeable tell me what is that relation, so I can
fix the part of the manual, that reads "prune: remove vertices in
threshold from lines (...)".

2. If the pruning thresh doesn't depend on angles/directions, how do I
understand the fact that any thresh>=0.03 prunes points which are at
intervals of 10 on a straight line?

Maciek

CCing Mr. Michel Wurtz in case he is still out there under this email,
maybe.




More information about the grass-dev mailing list