[Proj] lonlat default datum confusion

Andrew Simpson drew.simpson.home at gmail.com
Thu Feb 2 15:27:24 EST 2012


Greetings,

I am having trouble understanding how lonlat is handled in cs2cs and proj

If I cs2cs straight from "WGS 84 / UTM zone 20N" to "Montserrat 1958 / BWI"
I get one result.

If I cs2cs to lonlat in between I get a different result.

If I provide a datum on the conversion from lonlat to "Montserrat 1958 /
BWI" such as WGS84, I get the original result, even if the datum is not
applicable as in NAD27.

Is the datum enabling a portion of code that wouldn't otherwise be used,
and then just being discarded?

What EPSG code would lonlat default to, or does it default to the +to
coordinate system?

Thanks for any thoughts

Rel. 4.7.1, 23 September 2009 on Linux 2.6.26-2-686 #1 SMP Thu Sep 16
19:35:51 UTC 2010 i686 GNU/Linux


====================================
--  All the way from UTM to Monty
cs2cs -v +init=epsg:32620 +to +init=epsg:2004 <<EOF
588710.63       1851124.52
EOF
# ---- From Coordinate System ----
#Universal Transverse Mercator (UTM)
#       Cyl, Sph
#       zone= south
# +init=epsg:32620 +proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m
# +no_defs +towgs84=0,0,0
#--- following specified but NOT used
# +ellps=WGS84
# ---- To Coordinate System ----
#Transverse Mercator
#       Cyl, Sph&Ell
# +init=epsg:2004 +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001
# +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m
# +no_defs
381799.69       1850374.10 37.86
=====================================

-- Inverse Proj from UTM
invproj -v -f "%.5f" +init=epsg:32620  <<EOF
588710.63       1851124.52
EOF
#Universal Transverse Mercator (UTM)
#       Cyl, Sph
#       zone= south
# +init=epsg:32620 +proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m
# +no_defs +towgs84=0,0,0
#--- following specified but NOT used
# +ellps=WGS84
-62.16775       16.74132

======================================
-- lonlat to Monty
cs2cs -v +proj=lonlat +to +init=epsg:2004  <<EOF
-62.16775 16.74132
EOF
# ---- From Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=lonlat +ellps=WGS84
# ---- To Coordinate System ----
#Transverse Mercator
#       Cyl, Sph&Ell
# +init=epsg:2004 +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001
# +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m
# +no_defs
382121.20       1850599.03 0.00

======================================
-- lonlat with a datum to Monty
cs2cs -v +proj=lonlat +datum=NAD27 +to +init=epsg:2004  <<EOF
-62.16775 16.74132
EOF
# ---- From Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=lonlat +datum=NAD27 +ellps=clrk66
# +nadgrids=@conus, at alaska, at ntv2_0.gsb, at ntv1_can.dat
# ---- To Coordinate System ----
#Transverse Mercator
#       Cyl, Sph&Ell
# +init=epsg:2004 +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001
# +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m
# +no_defs
381799.69       1850374.10 37.86
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/proj/attachments/20120202/ad693ed0/attachment.htm 


More information about the Proj mailing list