[SoC] Re: [GRASS-dev] SoC Report: v.buffer/v.parallel reimplementation

Hamish hamish_b at yahoo.com
Fri Jun 13 22:19:42 EDT 2008


Hi,

I know it is very much a work in progress, but some minor comments/suggestions.

http://trac.osgeo.org/grass/changeset/31708

v.parallel2/main.c
-side_opt->options = "left,right";
+side_opt->options = "both,left,right";
?

v.parallel2/vlib_buffer.c
+#define LENGTH(DX, DY) (sqrt((DX*DX)+(DY*DY)))

why not use hypot() ? There are vector library versions too, for both Cartesian and lat/lon. Vect_line_length(), Vect_line_geodesic_length() and the rest in lib/vector/Vlib/line.c
Vect_line_geodesic_length() will switch to hypot if location is not lat/lon, otherwise it uses the great circle calc.

any thoughts in general on how to deal with parallel lines in lat/lon? I would guess to make them parallel "on the ground" rather than as simple parallel rhumblines.

3D?


+G_message("tol=%f atol=%f", tol, angular_tol);
I would recommend making good use of G_debug() there. You can set the level to "0" to always show the message when developing then adjust that to something higher later on.


that's all,
Hamish




      



More information about the Soc mailing list