[[GRASS5] v.digit fixed (and another wish and a bug)]

On Sat, Nov 17, 2001 at 04:29:23PM +0100, Radim Blazek wrote:

Markus Neteler wrote:
>
> Hi,
>
> I think I have fixed the "NOTE: 1 new node needed" bug in v.digit.
> The problem was that the number of points needed for snapped lines
> was not reduced in
>
> libes/vect32/diglib/check_node.c
> (fixed). Radim, can you update for the grass51/ library?

Are you sure?

     /* see if this line has 2 points that snap */
    if ( (fabs(xarray[0] - xarray[n_points-1]) <= map->snap_thresh) &&
         (fabs(yarray[0] - yarray[n_points-1]) <= map->snap_thresh) )
        {
        node->N2 = node->N1;
        new_nodes--; /* reduce as we are snapping MN */
        }

I think that original version was correct:
Ends of line are close together (< thresh0 and only one new node is needed =>
no need to increase number of new nodes (new_nodes). But we cannot decrease.

Is it : "NOTE: 1 new node needed" realy bug? it only reports that new nodes
were added to nodes structure - are there other problems?

Radim,

thanks for your comment. You are right, I have reverted the change in
src/libes/vect32/diglib/check_node.c

and fixed again
src/mapdev/v.digit/digitize.c

Also I improved (hopefully) the messages for lines and areas.
If possible, test again.

Hope to have caught all problems now related to the "NOTE:..." messages.

Markus

--
Markus Neteler

ITC-irst, Istituto per la Ricerca Scientifica e Tecnologica
     Project on Predictive Models for the Environment
Via Sommarive, 18 - 38050 Povo (Trento), Italia
tel +39 0461 314 -520 (fax -591) http://mpa.itc.it