2

I am attempting to convert from EPSG 4326 to State Plane NAD83 using Proj4js but the results are coming out in meters. In python there is an option to preserve the units such as:

p1 = Proj( init="epsg:2264", preserve_units=True )

...then do the tranform

In Proj4js, I am attempting to do the same thing:

var source = new proj4.Proj("EPSG:4326"); 
var dest = new proj4.Proj("EPSG:2264", true);  // does not like the true param
var webWgs84Point = [longitudeg, latitudeg];
var p = new proj4.toPoint(webWgs84Point);
proj4.transform(source, dest, p);

But it does not like the true param on this line:

var dest = new proj4.Proj("EPSG:2264", true);  // does not like the true param

Does anyone know how to force the transformation to output in feet?

If I remove the param:

var dest = new proj4.Proj("EPSG:2264");

It works but, the points (in var p) are in meters instead of feet. I need them to be in feet.

1

It has been fixed as of version 2.3.10 of proj4js. If the destination projection has the ft or us-ft for the +units property, the transform method will convert it to us survey feet automatically:

Add handling for +units in projString

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.