[GRASS5] datum transforms...
paul-grass at stjohnspoint.co.uk
Mon Jan 13 09:54:23 EST 2003
On Mon, 13 Jan 2003, Frank Warmerdam wrote:
> Paul / Eric,
> I would prefer to see GRASS use the pj_set_finder() function to install a
> function to find PROJ support files. This finder function would form the
> path to the PROJ files within the GRASS tree using methods similar to what
> you use to set the PROJ_LIB now.
At last this sounds like an elegant solution! As I see it the finder
function would be very similar to Eric's set_proj_lib_env and would go in
So before calling pj_transform(), the transform function ( pj_do_proj() )
would have a line something like this:
pj_set_finder( "set_proj_lib" );
and the finder function itself could look like:
#define GRIDDIR "/etc/nad"
const char * set_proj_lib (const char *name)
const char *gisbase = G_gisbase();
char *buf = NULL;
size_t len = strlen(gisbase) + sizeof(GRIDDIR)
+ strlen(name) + 1;
buf = G_malloc(len);
sprintf (buf, "%s%s/%s", gisbase, GRIDDIR, name);
How does this look?
More information about the grass-dev