[mapserver-dev] Proj4

Cristiano Sumariva sumariva at gmail.com
Thu Dec 1 09:08:18 EST 2011


Hello I sending this output from cs2cs ( proj library convertion tool ) to
see if that can be a bug or misconcept.
I tried to transform geographic coordinates from on Earth figure to another
figure, basic datum change.

cs2cs -E -v +init=epsg:4618 -f "%.12f" +to +proj=longlat +ellps=WGS84
+towgs84=0,0,0
# ---- From Coordinate System ----
#Lat/long (Geodetic alias)
#
# +init=epsg:4618 +proj=longlat +ellps=aust_SA +no_defs
# ---- To Coordinate System ----
#Lat/long (Geodetic alias)
#
# +proj=longlat +ellps=WGS84 +towgs84=0,0,0
-7 -1
-7 -1 -7.000000000000 -1.000000000000 0.000000000000

By the output above is clear that it does not make the transformation.
I could discover the reason. It is the missing +towgs84 from source srid. I
attached it in command line below and got different results.

cs2cs -E -v +init=epsg:4618 +towgs84=-67,3,-38,0,0,0,0 -f "%.12f" +to
+proj=longlat +ellps=WGS84 +towgs84=0,0,0
# ---- From Coordinate System ----
#Lat/long (Geodetic alias)
#
# +init=epsg:4618 +towgs84=-67,3,-38,0,0,0,0 +proj=longlat +ellps=aust_SA
# +no_defs
# ---- To Coordinate System ----
#Lat/long (Geodetic alias)
#
# +proj=longlat +ellps=WGS84 +towgs84=0,0,0
-7 -1
-7 -1 -7.000046608443 -1.000353975944 -43.192882359959

So looks like the cs2cs tool requires +towgs84 on both source and
destination to compute coordinate change.
I expected that proj utils complained about this missing parameter.
Also trying a st_transform on postgis package behaves like the cs2cs
command line. It does not transform the geometry.
I expected that function reported something if it can not make the
transformation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20111201/7ea98e02/attachment.html


More information about the mapserver-dev mailing list