removing duplicate vectors

McCauley Technical Services darrellmy at
Thu Jan 14 04:35:05 EST 1993

related to the project described in my last post (removing duplicate
items in a vector file), do the standard grass functions write points
in some particular order, or should I have to sort the x/y vectors
in the line_pnts structure before I make a "one pass" comparison?

by "one pass" comparison, I mean:

	  for (i = 0; i < Points_a->n_points; ++i)
	    if (iszero (Points_a->x[i] - Points_b->x[i]) &&
		iszero (Points_a->y[i] - Points_b->y[i]))
          match = (match == Points_a->n_points) ? 1 : 0;

comparing Points_a with Points_b.

James Darrell McCauley                                   phone: 317.497.4757
McCauley Technical Services                      internet: darrellmy at
P.O. Box 2485                        West Lafayette, Indiana 47906-0485, USA

More information about the grass-dev mailing list