It's been about 18 months since I converted lon/lat coordinates to
projected locations, and I need to add 2 more locations to my analyses and
maps. I re-read the cs2cs man page but cannot get the conversion to run. A
clue stick is appreciated.
Here's my script (and I made it executable):
cs2cs +proj=longlat +datum=NAD83 +to +proj=lcc +datum=NAD83 +ellps=GRS80
+lat_1=43.0 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0
+nadgrids=WO <<EOF
122d30'32.43"W 45d19'19.49"N
122d30'55.67"N 45d19'36.44"N
122d30'33.14"N 45d23'90.87"N
122d30'17.92"W 45d18'52.45"N
122d29'34.08"W 45d18'47.16"N
EOF
When I invoke the script it sits there and does nothing. What am I
missing?
Rich
On 19/08/11 18:09, Rich Shepard wrote:
It's been about 18 months since I converted lon/lat coordinates to
projected locations, and I need to add 2 more locations to my analyses and
maps. I re-read the cs2cs man page but cannot get the conversion to run. A
clue stick is appreciated.
Here's my script (and I made it executable):
cs2cs +proj=longlat +datum=NAD83 +to +proj=lcc +datum=NAD83 +ellps=GRS80
+lat_1=43.0 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0
+nadgrids=WO <<EOF
122d30'32.43"W 45d19'19.49"N
122d30'55.67"N 45d19'36.44"N
122d30'33.14"N 45d23'90.87"N
122d30'17.92"W 45d18'52.45"N
122d29'34.08"W 45d18'47.16"N
EOF
When I invoke the script it sits there and does nothing. What am I
missing?
There are line breaks at the end of each line of your command. Erase these line breaks, or put a '\' at the end of each line:
cs2cs +proj=longlat +datum=NAD83 +to +proj=lcc +datum=NAD83 +ellps=GRS80 \
+lat_1=43.0 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 \
+nadgrids=WO <<EOF
Moritz
On Fri, 19 Aug 2011, Moritz Lennert wrote:
There are line breaks at the end of each line of your command. Erase these line breaks, or put a '\' at the end of each line:
Moritz,
Thank you. Why those were not in the script before I don't know.
Rich
It’s been about 18 months since I converted lon/lat coordinates to
projected locations, and I need to add 2 more locations to my analyses and
maps. I re-read the cs2cs man page but cannot get the conversion to run. A
clue stick is appreciated.
Here’s my script (and I made it executable):
cs2cs +proj=longlat +datum=NAD83 +to +proj=lcc +datum=NAD83 +ellps=GRS80
+lat_1=43.0 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0
+nadgrids=WO <<EOF
122d30’32.43"W 45d19’19.49"N
122d30’55.67"N 45d19’36.44"N
Is this a typo ^^^ ??
122d30’33.14"N 45d23’90.87"N
again here ^^
122d30’17.92"W 45d18’52.45"N
122d29’34.08"W 45d18’47.16"N
EOF
When I invoke the script it sits there and does nothing. What am I
missing?
Here’s what I get when I changed the degrees to W:
micha@hayun-820:~$ cs2cs +init=epsg:4269 +to +init=epsg:2991 << EOF
122d30’32.43"W 45d19’19.49"N
122d30’55.67"W 45d19’36.44"N
EOF
242511.68 398796.64 0.00
242018.57 399332.13 0.00
···
--
Micha Silver
Arava Development Co. +972-52-3665918
[http://surfaces.co.il](http://surfaces.co.il)
On Fri, 19 Aug 2011, Moritz Lennert wrote:
cs2cs +proj=longlat +datum=NAD83 +to +proj=lcc +datum=NAD83 +ellps=GRS80 \
+lat_1=43.0 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 \
+nadgrids=WO <<EOF
Five lines of input:
122d30'32.43"W 45d19'19.49"N
122d30'55.67"N 45d19'36.44"N
122d30'33.14"N 45d23'90.87"N
122d30'17.92"W 45d18'52.45"N
122d29'34.08"W 45d18'47.16"N
Six lines of output?
12269955.93 5605081.62 0.00
242511.51 398797.24 -0.00
-5967878.84 5897612.82 -0.00
-5958957.53 5899419.46 -0.00
242807.02 397955.05 -0.00
243757.62 397768.55 -0.00
I must still not have it correct.
Thanks,
Rich
On Fri, 19 Aug 2011, Micha Silver wrote:
Is this a typo ^^^ ??
122d30'33.14"N 45d23'90.87"N
again here ^^
122d30'17.92"W 45d18'52.45"N
122d29'34.08"W 45d18'47.16"N
EOF
Sigh. Yep.
Thanks, Micha.
Rich
On 19/08/11 18:47, Rich Shepard wrote:
On Fri, 19 Aug 2011, Moritz Lennert wrote:
cs2cs +proj=longlat +datum=NAD83 +to +proj=lcc +datum=NAD83
+ellps=GRS80 \
+lat_1=43.0 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 \
+nadgrids=WO <<EOF
Five lines of input:
122d30'32.43"W 45d19'19.49"N
122d30'55.67"N 45d19'36.44"N
122d30'33.14"N 45d23'90.87"N
122d30'17.92"W 45d18'52.45"N
122d29'34.08"W 45d18'47.16"N
Six lines of output?
12269955.93 5605081.62 0.00
242511.51 398797.24 -0.00
-5967878.84 5897612.82 -0.00
-5958957.53 5899419.46 -0.00
242807.02 397955.05 -0.00
243757.62 397768.55 -0.00
I must still not have it correct.
Try erasing the empty line between the command and the data.
Moritz
On Fri, 19 Aug 2011, Moritz Lennert wrote:
Try erasing the empty line between the command and the data.
Moritz,
Huh! I wonder how the script worked the last time I used it without being
correct. Strange.
Thank you,
Rich