[OSRS-PROJ] cs2cs question: Gauss-Boaga

Frank Warmerdam warmerdam at pobox.com
Thu May 30 09:05:23 EDT 2002

Markus Neteler wrote:
> Dear list,
> sorry for a sort of "newbie" question: Today I tried to
> investigate if cs2cs does datum transformation for
> the Italian Gauss-Boaga system:
> [btw: there is no +towgs84 present for the Gauss-Boaga related 
> EPSG code 26591 in nad/epsg, any reason for that?]


The code that looks up datums in the EPSG database and tries to derive
a towgs84 value for them fails if their are no ways to translate the
datum directly to wgs84 or if there is more than one way.  I have looked
into the datum in question but I imagine there is more than one transformation
available (presumably applicable to different areas) so the code has no way to
know which is most apppropriate.

> I struggled here: While this is doing calculations:
> cs2cs -v +proj=latlong +datum=WGS84 +to +init=epsg:26591 +towgs84=-225,-65,9
> # ---- From Coordinate System ----
> #Lat/long (Geodetic)
> #
> # +proj=latlong +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
> # ---- To Coordinate System ----
> #Transverse Mercator
> #       Cyl, Sph&Ell
> # +init=epsg:26591 +towgs84=-225,-65,9 +proj=tmerc +lat_0=0.000000000
> # +lon_0=9.000000000 +k=0.999600 +x_0=1500000.000 +y_0=0.000 +ellps=intl
> # +units=m +no_defs
> the next lines don't: 
> cs2cs -v +proj=latlong +datum=wgs84 +ellps=WGS84 +towgs84=0,0,0 \
>   +to +towgs84=-225,-65,9 +proj=tmerc +lat_0=0.0 \
>   +lon_0=9.0 +k=0.999600 +x_0=1500000.000 +y_0=0.000 +ellps=intl \
>   +units=m +no_defs
> Using from definition: proj=latlong datum=wgs84 ellps=WGS84 towgs84=0,0,0
> Rel. 4.4.5, 9 January 2002
> <cs2cs>:
> projection initialization failure
> cause: unknown elliptical parameter name
> program abnormally terminated

It would appear the problem is use of +datum=wgs84 instead of +datum=WGS84.
To my mind it would be better if all proj comparisons to internal names was
case insensitive, but this does not appear to be the established practice.

> ...although both should be the same (or not?). Beside that I would like
> to know if I am right in my assumption, that this "cs2cs" with additional
> +towgs84 parameter is the way to reproject from lat/long to Gauss-Boaga
> *with* datum transformation from WGS84 to Rome40. Say, at least with
> less error than using the 'proj' command?

Your approach seems good, though the transformation will only be accurate
as the +towgs84 values you gave approximates the datum shift in the area you
are working.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.

More information about the Proj mailing list