[Proj] SPCS NC (3200) -> Lat Long Conversion Problem w/ Program

Eric Miller EMiller at dfg.ca.gov
Mon May 2 16:17:02 EDT 2005


Double check your input file reading.  It doesn't look too good to me. 
I tried your original code, but hardcoded the sample values you provided
and it produced the desired (presumably correct) result.  All I can
figure is what you're reading into your variables isn't what you think
it is.

BTW, the following might work better for input (though, I'm not sure if
those dummy characters are whitespace).  Or, use fgets() and sscanf(). 
feof() is only true after a failed read and so is useless for seeing if
there is more data available to read.

while(fscanf(ifp, "%lf %lf %lf %lf %lf", &pntX, &pntY, &pntZ, &pntI,
&GPSTime) == 5) {

}

Eric G. Miller
GIS Analyst
Wildlife and Habitat Data Analysis Branch
Department of Fish and Game

>>> KSLim at atlantictech.com 05/02/05 10:54 AM >>>
Gerald,

Thanks for the tips.  I will consider libproj4 in the future.

Of interest to the group, I modified my code to use the "pj_inv"
function
instead of "pj_transform" and guess what... the same (incorrect)
output
(posted in original message) is returned by "pj_inv".





More information about the Proj mailing list