Skip to main content
added 6 characters in body
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

Use a here-string and pipe "|" to cs2cs (note you must have a new line immediately after the opening @" and before the closing "@)

echo @"
45d15'33.1" 111.5W
45d15.551666667N -111d30
+45.25919444444 111d30'000w
"@ | cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27
echo @"
45d15'33.1" 111.5W
45d15.551666667N -111d30
+45.25919444444 111d30'000w
"@ | cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 -r

Or add the coordinates to a file (e.g coords.txt) and pass that as an argument

cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 coords.txt
cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 -r coords.txt

Use a here-string and pipe "|" to cs2cs

echo @"
45d15'33.1" 111.5W
45d15.551666667N -111d30
+45.25919444444 111d30'000w
"@ | cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27

Or add the coordinates to a file (e.g coords.txt) and pass that as an argument

cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 coords.txt

Use a here-string and pipe "|" to cs2cs (note you must have a new line immediately after the opening @" and before the closing "@)

echo @"
45d15'33.1" 111.5W
45d15.551666667N -111d30
+45.25919444444 111d30'000w
"@ | cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 -r

Or add the coordinates to a file (e.g coords.txt) and pass that as an argument

cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 -r coords.txt
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

Use a here-string and pipe "|" to cs2cs

echo @"
45d15'33.1" 111.5W
45d15.551666667N -111d30
+45.25919444444 111d30'000w
"@ | cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27

Or add the coordinates to a file (e.g coords.txt) and pass that as an argument

cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 coords.txt