[GRASS-dev] Re: [GRASS-user] problem with v.edit tool=merge

Martin Landa landa.martin at gmail.com
Thu Mar 29 05:24:32 EDT 2007


Hi,

no, there is another problem. Merge tool has been updated and snap
tool not. Snap tool in v.edit is very simple:

1) select lines
2) snap *first two* lines from the list [regardless of threshold -- it is a bug]

see [1,2]

Behaviour of merge tool is a little bit different. It tries to merge
*all* selected lines.

So there is *important* question for future development of v.edit,
should be snap tool updated (snap all selected lines) or merge tool
modified according to current simplified snap tool (i.e. merge only
first two selected lines and  leave rest of selected lines untouched)?

Martin

[1] http://gama.fsv.cvut.cz/~landa/temp/grass/v-edit/linie_cat.png
[2] http://gama.fsv.cvut.cz/~landa/temp/grass/v-edit/linie_snap_cat.png

2007/3/29, Jarek Jasiewicz <jarekj at amu.edu.pl>:
>
> >
> > I disabled threshold for merging lines.
> >
> > Martin
> >
> >> Jarek
> >>
> >
> >
> Martin!
>
> Look on line 259 in merge.c: (it is copy form newest cvs version)
>
> ....
>  /* find the minimal distance between first or last point of both lines */
>     mindistidx = 0;
>     for (i = 0; i < 4; i++)
>     if (distances[i] < distances[mindistidx])
>         mindistidx = i;
>
>     G_debug (3, "merge line ? mindist: %g, thresh: %g",
>          distances[mindistidx], thresh);
>
> look here: >>>>>>   if (distances[mindistidx] > thresh) {
>     return 0;
>     }
>
> .....
>
>
> maybe here is the problem
> that part of code differs slighty from the part of code in snap.c where
> is no test if distance is lesser than treshold
>
> Jarek
>


-- 
Martin Landa <landa.martin at gmail.com> * http://gama.fsv.cvut.cz/~landa *




More information about the grass-dev mailing list