[GRASS5] Projection programs

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Feb 4 04:17:52 EST 2003

OK, v.mkquads and i.points3 should be more robust now.

On Mon, 3 Feb 2003, Eric G. Miller wrote:

> If you're asking about convert.c in v.mkquads, your usage is erroneous.
> G_find_key_value() returns a pointer to the value in the key_value
> struct array or *NULL*.  First, you don't need to allocate any memory;

This was the way it was used in src/image3/convert_ll.c (i.points3), which
usage I copied over to v.mkquads. I suppose its not a good idea to infer a
function's correct usage by the way other modules use it!

> second, you're  clobbering it; Third, if ellps is not found and a NULL
> pointer is returned you try to copy "wgs84" like sprintf (NULL, "wgs84);
> Oops!

Yes this was just me; I didn't look over it for long enough. Was just
trying to get the bugfix out too quickly.

Thank you for your help. I've corrected the usage now. It should only be
an extremely unlikely case that a PROJ_INFO file wouldn't contain an
ellps: value anyway. I'll try and tidy up the whole idea of using default
values at a future date sometime.


More information about the grass-dev mailing list