# [Proj] Reversible Calculation? (cs2cs)

oon at informatika.org oon at informatika.org
Tue Sep 12 08:27:40 EDT 2006

```Dear All Proj Users & Developers,

I've tried to convert from WGS84 to UTM (zone 47) with cs2cs:
=====
minnie\$ ./cs2cs -v +proj=latlong +datum=WGS84 +to +proj=utm
+datum=WGS84 +zone=47 -r +units=m << EOF
> 3d30'17.47"N 98d36'27.58"E
> EOF
# ---- From Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=latlong +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
# ---- To Coordinate System ----
#Universal Transverse Mercator (UTM)
#       Cyl, Sph
#       zone= south
# +proj=utm +datum=WGS84 +zone=47 +units=m +ellps=WGS84 +towgs84=0,0,0
456423.28       387405.51 0.00
=====

point 3d30'17.47"N 98d36'27.58"E in WGS84 converted into UTM (zone47)
(X,Y,Z) = (456423.28,387405.51,0.00)

Then I want to reverse it back to WGS84.
I only replace the syntax of cs2cs, before "+to" replace with after "+to".

=====
minnie\$ ./cs2cs -v +proj=utm +datum=WGS84 +zone=47 -r +units=m +to
+proj=latlong +datum=WGS84 << EOF
> 456423.28       387405.51 0.00
> EOF
# ---- From Coordinate System ----
#Universal Transverse Mercator (UTM)
#       Cyl, Sph
#       zone= south
# +proj=utm +datum=WGS84 +zone=47 +units=m +ellps=WGS84 +towgs84=0,0,0
# ---- To Coordinate System ----
#Lat/long (Geodetic)
#
# +proj=latlong +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
97d59'8.086"E   4d7'43.261"N 0.000
minnie:~/Desktop/WGS84/proj-4.4.9/src oon\$
=====

The point UTM (zone 47) (X,Y,Z) = (456423.28,387405.51,0.00) no reversible
into 3d30'17.47"N 98d36'27.58"E in WGS84.
But the result said "97d59'8.086"E   4d7'43.261"N 0.000"

What's wrong with my cs2cs syntax?

btw, why does the Proj library (or cs2cs command) didn't calculate the
zone automatically for UTM?
(the manual describe the UTM Zone: every 6 deg, start from 180W to 180E)

thanks.

--
regards,
Oon Arfiandwi
Software Engineer,
Bandung, Indonesia.

```