[Gdal-dev] OGR 7 parameter Bursa Wolf transformation

Frank Warmerdam warmerdam at pobox.com
Mon Nov 17 12:09:34 EST 2003


Per Månsson wrote:
> 
> 
> I would like to make 7 parameter Bursa Wolf transformation to WGS84 
> Latitude, Longitude.
> 
> The  Ellipsoid is Bessel 1841, with the parameters:
> a   = 6377397.155
> 1/f = 299.1528128
> and I have the 7 parameters for the transform.
> 
> How do I create the two OGRSpatialReference objects for this 
> transformation ?

Per,

You should setup the Bessel GEOGCS with SetGeogCS() using the
appropriate semi-major and inv flatten value.

eg.

   OGRSpatialReference oSrcSRS;

   oSrcSRS.SetGeogCS( "MyGEOGCS", "MyDatum", "Bessel 1841",
                      6377397.155,  299.1528128 );

Then set the "TOWGS84" bursa wolf values.  Note, there are more than
one convension for the "handedness" if bursa wolf rotations and the units
of the scaling factor.  If you are getting grossly wrong values that may be
your problem, and we would have to dig into what OGR uses (what PROJ.4
uses that is).

   oSrcSRS.SetTOWGS84( 7-values );

The WGS84 can be setup more directly.

   OGRSpatialReference oDstSRS;

   oDstSRS.SetWellKnownGeogCS( "WGS84" );

Then setup a coordinate transformation object and use it ... that part
should be covered in the tutorial or spots like gdalinfo.c.

Good luck,

-- 
---------------------------------------+--------------------------------------
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





More information about the Gdal-dev mailing list