[GRASS5] r.contour update

Hi everybody,
yesterday Markus has commited a bug fix and
enhancement version of r.contour that I have hacked during the weekend.
What's new:
* category support bug has been fixed: r.contour2 produces also
  dig_cats file, so d.what.vect no more complain about missing
  category support. Since a contour level could be floatig point
  I've inserted in the label the true value, whilst category number
  remains its integer equivalent ( ===> so there may be problems if
  one asks for fp contour levels that match the same integer number, I
  haven't tested that case);
* a little trick (derived from GMT contour program) avoids some
  kind of backtrack (well, I was thinking any kind of backtrack, but
  Justin showed me that I was wrong :slight_smile: : data matrix is parsed,
  and if a cell whose data matches exactly
  a contour value its value is added a small quantity (the smaller
  one that makes cell[i] + small != cell[i], I've taken into
  consideration double encoding).
* one can specify a minimum number of point for a contour line to
  be put into outout, so that small spurs, single points and so
  on won't be present and the output will be more clear (that's
  optional anyway);
* in my opinion there were minor memory handling problems in

  r.contour, I've corrected them (Head.map_name was not guaranteed
  to be properly terminated, Points structures in contour function
  were not deallocated).
Markus has corrected some remaining bugs as well.
Bye
Andrea Aime

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Andrea,

I grabbed the r.contour yesterday and gave it a test run. It seems to
work quite nicely.

I just have a comment or question about compiling.

Of course it compiled fine under Linux. It gave me a bit of a problem
under Solaris (7). The problem was the definition of DBL_EPSILON. I
believe this is defined in float.h. The float.h file is referenced under
Linux from math.h which is good. It is not referenced by math.h under my
Solaris. I simply added include float.h to the source (main.c) and it
built and worked fine on Solaris.

Could the definition of DBL_EPSILON be added directly to the code to
avoid dependancies or does its definition vary between platforms?

--
Bob Covill

Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Justin Hickey already did that. :slight_smile:
Just grab again r.contour from CVS, but beware, we are still
working on it, so in the next days we may release a new version.
(btw, if anyone wants to collaborate he would be welcomed :wink: )
Bye
Andrea Aime

Bob Covill wrote:

Andrea,

I grabbed the r.contour yesterday and gave it a test run. It seems to
work quite nicely.

I just have a comment or question about compiling.

Of course it compiled fine under Linux. It gave me a bit of a problem
under Solaris (7). The problem was the definition of DBL_EPSILON. I
believe this is defined in float.h. The float.h file is referenced under
Linux from math.h which is good. It is not referenced by math.h under my
Solaris. I simply added include float.h to the source (main.c) and it
built and worked fine on Solaris.

Could the definition of DBL_EPSILON be added directly to the code to
avoid dependancies or does its definition vary between platforms?

--
Bob Covill

Tekmap Consulting
P.O. Box 2016 Fall River, N.S.
B2T 1K6
Canada

E-Mail: bcovill@tekmap.ns.ca
Phone: 902-860-1496
Fax: 902-860-1498

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'