[GRASS-dev] oproj void** invalid conversion

Andreas Jochem andruit at gmx.de
Mon Feb 16 12:21:33 EST 2009


Hi,
I am trying to convert Coordinates to lat / long. I would like to save 
the output projection parameters in oproj.

But the compiler is complaining.

error: invalid conversion from ‘void*’ to ‘void**’.

If I use *oproj.pj instead of oproj.pj the compiler doesn't complain 
anymore but the transformation to lat / long does not work.

The code is following below.

Does anybody know this problem. I used this code a couple of months ago 
and it worked.

Thanks

Andi


struct Key_Value *in_proj_info, *in_unit_info; /* projection information 
of input map */
struct pj_info iproj; /* input map proj parameters */
struct pj_info oproj; /* output map proj parameters */


/* read current projection info */
if ((in_proj_info = G_get_projinfo()) == NULL)
G_fatal_error("Can't get projection info of current location");

if ((in_unit_info = G_get_projunits()) == NULL)
G_fatal_error("Can't get projection units of current location");

if (pj_get_kv(&iproj, in_proj_info, in_unit_info) < 0)
G_fatal_error("Can't get projection key values of current location");


G_free_key_value( in_proj_info );
G_free_key_value( in_unit_info );


oproj.zone = 0;
oproj.meters = 1.;
sprintf(oproj.proj, "ll");
if ((oproj.pj = pj_latlong_from_proj(iproj.pj)) == NULL)
G_fatal_error("Unable to set up lat/long projection parameters");




More information about the grass-dev mailing list