[Proj] Proj4js EPSG:4326 to EPSG:26786 (SP NAD27) 100+ feet Off

Scott DeHainaut scottdehainaut at comcast.net
Fri Oct 14 19:38:04 PDT 2011


Greetings,

I'm working on a web project and using Proj4js for the first time to project
coordinates from Google Maps lat/lon WGS84 into Massachusetts Stateplane
NAD27 feet.  To test my process I'm using a surveyed point for which I have
both lat/lon and MA SP NAD27 feet coordinates.  The surveyed coordinates in
SP are easting 866074.86 and northing 231916.59.

When I use Proj4js to go from lat/lon to MA SP NAD27, I'm 100+ feet from the
surveyed coordinates.  Here's the javascript snippet that's performing the
conversion:

var latGeo = 41.63238400230
var lonGeo = -70.52620887720
var source = new Proj4js.Proj('EPSG:4326');  /* Lat/Lon projection */
var dest = new Proj4js.Proj('EPSG:26786');  /* MA SP Mainland NAD27
projection */
var p = new Proj4js.Point(lonGeo,latGeo);
Proj4js.transform(source,dest,p);

The coordinates that it produces are easting 866209.68 and northing
232732.59 (I'm rounding to 2 decimal places).  These are quite different
from the surveyed coordinates.

I'm using the following projection files:

Proj4js.defs["EPSG:4326"]="+title=WGS +proj=longlat +ellps=WGS84
+datum=WGS84 +no_defs"
and
 which contains
Proj4js.defs["EPSG:26786"] = "+title=MA Stateplane Mainland NAD27 feet
+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41
+lon_0=-71.5 +x_0=182880.3657607315 +y_0=0 +ellps=clrk66 +datum=NAD27
+to_meter=0.3048006096012192 +units=feet +no_defs";

To check my work I fired up the Corpscon (v.6.0.1) utility and performed the
same conversion using the following parameters:
Input - Geographic, 1983 NAD 83(86)
Output - State Plane, 1927 - NAD 27, 2001 - Massachusetts Mainland, US
Survey Foot

The coordinates that Corpscon produces are easting 866074.86 and northing
231916.58, which are essentially the same as the survey coordinates but
quite a bit different from what I'm getting with Proj4js.  I'm still feeling
my way around this process so I'd appreciate any thoughts on what I might be
missing.

Many thanks for any help or guidance!

-Scott DeHainaut




--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Proj4js-EPSG-4326-to-EPSG-26786-SP-NAD27-100-feet-Off-tp6894605p6894605.html
Sent from the PROJ.4 mailing list archive at Nabble.com.



More information about the Proj mailing list