[Proj] pj_init - C programming question

Kevin S Lim KSLim at atlantictech.com
Wed May 18 15:03:41 EDT 2005

Hi list,

This is a C programming question.  If I wanted to populate the array of
strings for parms_in, what would be the best approach to do so?  In other
words, if you want to build parms_in and parms_out dynamically from two
input ESRI PRJ files, what would be the best implementation?

The reason I ask is b/c I started working with pointers (char **) and
dynamic memory allocation, but ran into the problem that when parms_in is
passed, it's the pointer and not the array of strings that is passed and
hence the initialization always fails.

Any input is welcome.  Thanks in advance.

-- Kevin


static char *parms_in[] = {
	"lat_1=43.93n",	// first standard parallel
	"lat_2=44.37n",	// second stardard parallel
	"lat_0=43.85n",	// central parallel
	"lon_0=94.27w",	// central meridian
if ( ! (ref_in = pj_init(sizeof(parms_in)/sizeof(char *), parms_in)) ) 	{
	//bail out...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20050518/35cdde07/attachment.html

More information about the Proj mailing list