[mapserver-users] pj_transform & pj_datum_transform
Arthur, John
John.Arthur at voicestream.com
Tue Jan 22 08:49:39 PST 2002
Now that these 2 function are included into php_proj.dll, what is the
correct way to use them? I was able to transform UTM to LatLong, but the
datums do not change from nad27 to nad83 when I use the following:
$lat = doubleval("336276.6563");
$lon = doubleval("4145316.5");
$parms[0] = "proj=utm";
$parms[1] = "ellps=clrk66";
$parms[2] = "zone=18";
$parms[3] = "no_defs";
$projUTM = pj_init($parms);
$parms[0] = "proj=latlong";
$parms[1] = "ellps=GRS80";
$parms[2] = "lat_0=36.0";
$parms[3] = "lon_0=-79.5";
$parms[4] = "lat_1=37.0";
$parms[5] = "lat_2=39.5";
$projGEO = pj_init($parms);
$ret = pj_datum_transform($projUTM, $projGEO, $lat, $lon, 0 );
$ln = ($ret["u"]);
$lt = ($ret["v"]);
echo "<BR>".$ln."<BR>".$lt;
This returns:
-76.8507223773
37.442055949314
Which is NAD27, but should return:
-76.850410
37.442204
Which is NAD83
What am I doing wrong? I have the PROJ_LIB path set. I am on a WINDOWS
2000 server w/apache & PHP 4.
Thank you for your help.
John Arthur
RF Technician
Office: (757) 490-7221
Cellular: (757) 692-1515
Email: john.arthur at voicestream.com
_~-^-~_
VoiceStream
W I R E L E S S
More information about the MapServer-users
mailing list