[Proj] WGS84 to Minnesota State Plane South

Arno Gerretsen arno at agerrius.nl
Thu Jan 3 04:03:23 EST 2008


Hi,

I am trying to convert some data for a friend from WGS84 lat/lon to 
Minnesota State Plane South. I use the proj4 library for that, but the 
results do not match with some of the control point data he gave me. So 
I am wondering if I maybe did something wrong in my code. Here is the 
code I used:

PJ *prjState = pj_init_plus("+proj=lcc +lat_0=43 +lon_0=-94 
+lat_1=45.21666666666666666666666666666666666 
+lat_2=43.783333333333333333333333 +x_0=800000 +y_0=100000 +ellps=GRS80 
+datum=NAD83 +units=ft +no_defs");
PJ *prjWGS = pj_init_plus("+proj=latlong +ellps=WGS84 +datum=WGS84");

double x[1], y[1], z[1];
int err;

x[0] = -93.242251388888888888888888888889 * DEG_TO_RAD;
y[0] = 44.887752777777777777777777777778 * DEG_TO_RAD;
z[0] = 0.0;

err = pj_transform(prjWGS, prjState, 1, 1, x, y, z);

With this code and for the lat/lon values listed in the code, I get the 
following State Plane coordinates returned: 2821057.917382 1017161.112401

While the reference data says it should be: 2821052.29398607, 
1017159.04559559

As you can see the difference is a few feet. Can anybody tell me if I 
have done something wrong in my code, or should I doubt the quality of 
the reference data :)?

Thanks,

Arno


More information about the Proj mailing list