<div>Greetings,</div><div> </div><div>I am having trouble understanding how lonlat is handled in cs2cs and proj</div><div> </div><div>If I cs2cs straight from &quot;WGS 84 / UTM zone 20N&quot; to &quot;Montserrat 1958 / BWI&quot; I get one result.</div>
<div> </div><div>If I cs2cs to lonlat in between I get a different result.</div><div> </div><div>If I provide a datum on the conversion from lonlat to &quot;Montserrat 1958 / BWI&quot; such as WGS84, I get the original result, even if the datum is not applicable as in NAD27.</div>
<div> </div><div>Is the datum enabling a portion of code that wouldn&#39;t otherwise be used, and then just being discarded?</div><div> </div><div>What EPSG code would lonlat default to, or does it default to the +to coordinate system?</div>
<div> </div><div>Thanks for any thoughts</div><div> </div><div>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</div><div> </div><div> </div><div>====================================</div>
<div>--  All the way from UTM to Monty</div><div>cs2cs -v +init=epsg:32620 +to +init=epsg:2004 &lt;&lt;EOF<br>588710.63       1851124.52<br>EOF</div><div># ---- From Coordinate System ----<br>#Universal Transverse Mercator (UTM)<br>
#       Cyl, Sph<br>#       zone= south<br># +init=epsg:32620 +proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m<br># +no_defs +towgs84=0,0,0<br>#--- following specified but NOT used<br># +ellps=WGS84<br># ---- To Coordinate System ----<br>
#Transverse Mercator<br>#       Cyl, Sph&amp;Ell<br># +init=epsg:2004 +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001<br># +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m<br># +no_defs<br>381799.69       1850374.10 37.86</div>
<div>=====================================<br>     <br>-- Inverse Proj from UTM</div><div>invproj -v -f &quot;%.5f&quot; +init=epsg:32620  &lt;&lt;EOF<br>588710.63       1851124.52<br>EOF</div><div>#Universal Transverse Mercator (UTM)<br>
#       Cyl, Sph<br>#       zone= south<br># +init=epsg:32620 +proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m<br># +no_defs +towgs84=0,0,0<br>#--- following specified but NOT used<br># +ellps=WGS84<br>-62.16775       16.74132</div>
<div> </div><div>======================================</div><div>-- lonlat to Monty</div><div>cs2cs -v +proj=lonlat +to +init=epsg:2004  &lt;&lt;EOF<br>-62.16775 16.74132 <br>EOF</div><div># ---- From Coordinate System ----<br>
#Lat/long (Geodetic)<br>#<br># +proj=lonlat +ellps=WGS84<br># ---- To Coordinate System ----<br>#Transverse Mercator<br>#       Cyl, Sph&amp;Ell<br># +init=epsg:2004 +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001<br>
# +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m<br># +no_defs<br>382121.20       1850599.03 0.00</div><div> </div><div>======================================</div><div>-- lonlat with a datum to Monty</div>
<div>cs2cs -v +proj=lonlat +datum=NAD27 +to +init=epsg:2004  &lt;&lt;EOF<br>-62.16775 16.74132 <br>EOF</div><div># ---- From Coordinate System ----<br>#Lat/long (Geodetic)<br>#<br># +proj=lonlat +datum=NAD27 +ellps=clrk66<br>
# <a href="mailto:+nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat">+nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat</a><br># ---- To Coordinate System ----<br>#Transverse Mercator<br>#       Cyl, Sph&amp;Ell<br># +init=epsg:2004 +proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001<br>
# +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=174,359,365,0,0,0,0 +units=m<br># +no_defs<br>381799.69       1850374.10 37.86</div>