[GRASS-user] problem with v.edit tool=merge
Jarek Jasiewicz
jarekj at amu.edu.pl
Thu Mar 29 06:41:15 EDT 2007
Martin Landa napisał(a):
> 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
>>
>
>
I rather suggest simplified form (eg.only two lines at once) because
there be the problem with which line merge with which first and the
second. In simple situation like this ---- ------ ------- it seems
very simple but with that:
--------
-----------
-----------
how to solve the proper order (cat, ids??) so results may be unpredictable
about threshold
I removed lines
if (distances[mindistidx] > thresh) {
return 0;
}
and compiled again it isn't the problem.
Jarek
More information about the grass-user
mailing list