[Proj] pj_init - C programming question

Kevin S Lim KSLim at atlantictech.com
Thu May 19 09:39:51 EDT 2005


-----Original Message-----
From: Martin Thierer [mailto:thierer at web.de] 
Sent: Thursday, May 19, 2005 3:01 AM
To: proj at xserve.flids.com
Subject: Re: [Proj] pj_init - C programming question

I'm not sure if I understand you, but this should work. If you make a
constant 
array like shown in your code then what you get _is_ an array of char*.
Maybe 
there's another reason why the initialization fails ?

Bye,

Martin

==================================

Yes, the code that was listed _does_ work. =)  But it assumes that you know
the projection parameter ahead of time and hence, can hard code them.

My question revolves around the situations when you _do not_ know what is
the projection and its parameters ahead of time.

My approach would have been to dynamically allocate memory to char ** for an
array of strings.

But when you call sizeof(), it returns the number of bytes for the pointer
and _not_ the sizeof() the array of string pointers.

So essentially I'm trying to define the input and output projection and
their parameters at run-time.

I hope this provides more clarification.

-- Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20050519/05b1dedd/attachment.html


More information about the Proj mailing list