[Proj] SPCS NC (3200) -> Lat Long Conversion Problem w/ Program
Gerald Evenden
gerald.evenden at verizon.net
Sat Apr 30 16:53:28 EDT 2005
Because I am not in any way involved with "pj_transformer" I cannot
help you
with your problem. However, if all you wish to do is transform NAD83
North
Carolina coordinates to geographic coordinates, I think there is a far
easier
way: libproj4.
Everything up to pj_init is the same but instead of using
pj_transformer you
simply use pj_inv (inverse entry). In addition, skip "parm_out" as it
is not needed,
nor any of the pnt[XY] stuff. Output of pj_inv is geographic
coordinates in radians.
The following script does an example where the program "lproj" is a
simple
application program that gives users access to the libproj4 library:
n83_3200="+proj=lcc +a=6378137 +es=.0066943800229 \
+lon_0=-79 +lat_1=36d10 +lat_2=34d20 +lat_0=33d45 \
+x_0=609601.22 +y_0=0 +units=us-ft"
lproj $n83_3200 -f %.9f -I <<EOF
2982350.290 849500.700
EOF
The results are:
-75.676777193 36.038892808
which match your Corpscon6 and cs2cs trials.
Entry pj_inv may still be left in the material you have and if it is, I
suggest
you check it out.
As an editorial comment to the general audience, this is why I believe
in
the separation of operations. Kitchen sink procedures
cloud the issue for those seeking solution to simple processes. Let
different
functions do projection, datum shifts, XYZ transforms, etc. Just make
it
easy to assemble the set of building blocks needed.
On Apr 30, 2005, at 2:34 PM, Kevin S Lim wrote:
> Issue: Output from my VC program does not match values from Corpscon6
> or cs2cs.
>
> Input: SPCS 3200 - North Carolina - 2982350.290 849500.700
>
> Proj4 Output (program): 75.764937678 33.842018951
>
> Corpscon6 and cs2cs output: 75.676777193 36.038892808
>
> Because the Corpscon6 and cs2cs output match, the problem likely lies
> in my source code below:
>
> START OF CODE ***************************************
>
> void ReProjectPoints(FILE *ifp, FILE *ofp)
> {
> ...
> _____________________________________
Jerry and the low riders: Daisy Mae and Joshua.
"The whole religious complexion of the modern world is due to the
absence from Jerusalem of a lunatic asylum." Havelock Ellis, 1914
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2332 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/proj/attachments/20050430/f795d5fd/attachment.bin
More information about the Proj
mailing list