[GRASS-user] Projection Confusion

Hamish hamish_b at yahoo.com
Fri Jun 15 15:59:46 PDT 2012


Rich wrote:
>   It took a while today for me
> to figure out where I went off the rails
> importing a text file in Lat/Lon coordinates to Nevada East
> State Plane Coordinate System, NAD 83, US Survey Feet
> (epsg:3421) using cs2cs. Still, I've become confused because
> of the apparent switch in projection coordinate
> sequence. Let me explain.
> 
>   The script file begins like this:
> 
> cs2cs -r +proj=latlong +datum=NAD83 +to +init=epsg:3421
> <<EOF
> +41.42188333    -115.99418333
> 
> with the latitude first and the longitude second.

n.b. lat,lon is y,x; note also the use of the +proj=latlong
alias instead of the true +proj=longlat setting, that doesn't
change the order but can help you see what's being done clearer;
and finally if you look at the option description in the cs2cs
man page -r only swaps the expected input order.


> What continues to throw me is that the output apparently has
> the longitude (easting) first and the latitude (northing)
> second:
> 
> 543495.65    28676372.70

(x,y)

>   Why this change in coordinate order?

it's working as designed. If you want to reverse the order of
the output for some reason you need to use cs2cs's -s flag too.


Hamish


More information about the grass-user mailing list