1

I have input data in EPSG:2263 with X and Y coordinates such as:

X,Y
987043,206407
982441,212359
990907,209020

(these locations are within NYC).

I need to convert these to WGS84. Using QGIS if I import these coordinates and tell it the input data is in "EPSG:2263, NAD83 / New York Long Island (ftUS)" successfully imports the coordinates and renders them correctly (e.g. if overlaid over a WGS84 map).

It gives me this as the conversion options:

+proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666  +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs

However, if I try to manually convert a point on the command line, for example:

cs2cs +proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000.0000000001 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs -f '%.8f'
987043,206407
-73.99000712    40.16666623 0.00000000,206407

The resulting point is obviously not correct and (if shown on Google Earth) is off the coast of New Jersey.

I'll admit projections and coordinate systems and converting between them does still quite baffle me...

Suggestions for how I should be adjusting those cs2cs options to get a correct conversion?

1 Answer 1

4

The correct syntax is:

cs2cs +proj=lcc +lat_1=41.03333333333333 +lat_2=40.66666666666666 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs +to +init=epsg:4326 -f %%.8f<nad.txt >out.txt

with

987043 206407

in the input file nad.txt to get this output:

-73.98992216    40.73321572 0.00000000

Note that input values have to be delimited by blanks, not commas.

1
  • So I was missing the to-projection; I thought it defaulted to EPSG:4326. And my input was comma-delimited instead of space-delimited. Commented Jul 6, 2015 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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