[Mapserver-users] Projection accuracy problems
Paul Dymecki
millardymecki at sympatico.ca
Mon Jan 20 12:22:28 PST 2003
Hi there,
I was wondering if anyone knows about projection differences between
proj4 and geotrans. I've tried both but am cannot get the same accuracy
with proj4 as with geotrans. Here is the proj4 code i'm using in mapscript.
Any help would be much appreciated,
Paul
Code for converting lat/long -> lcc
$lat = 64.16;
$lon = -95.50;
$parms1[0] = "proj=longlat";
$parms1[1] = "ellps=GRS80";
$parms1[2] = "datum=NAD83";
$parms1[3] = "no_defs";
$projLonLat = pj_init($parms1);
$parms2[0] = "proj=lcc";
$parms2[1] = "ellps=GRS80";
$parms2[2] = "datum=NAD83";
$parms2[3] = "lat_0= 49.0";
$parms2[4] = "lon_0= -95.0";
$parms2[5] = "lat_1= 49.0";
$parms2[6] = "lat_2= 77.0";
$parms2[7] = "units=m";
$projLCC = pj_init($parms2);
$ret = pj_transform($projLonLat, $projLCC, $lon, $lat,0 );
$ln = ($ret["u"]);
$lt = ($ret["v"]);
echo "<BR>".$ln."<BR>".$lt;
More information about the MapServer-users
mailing list