[OSRS-PROJ] Datum Shifting

Frank Warmerdam warmerda at home.com
Tue Jul 4 07:33:53 PDT 2000


Folks, 

I am finally getting around to incorporating datum shifting support into
PROJ.4, and I would be interested in some feedback on approaches. 

I have currently implemented 3 and 7 parameter molodensky transforms based
on cloning the code from NIMA's Geotrans, and using the Geocentric<->Geodetic
translation code from Geotrans unchanged.  I am also looking to incorporate
the NADCON nad27/83 conversion code already in PROJ.4, though I haven't yet. 

But, I would like to propose, and get feedback on the API and argument
syntax.  Unlike the existing NAD27/83 support, I would like this to be 
fully integrated into PROJ.4. 

Currently the PROJ.4 access can be summarized in via the API:

       PJ *pj_init(int argc, char **argv)

       projUV pj_fwd(projUV val, PJ *proj)

       projUV pj_inv(projUV val, PJ *proj)

       void pj_free(PJ *proj)

Note that it is only support translation back and forth between a projection
and geodetic (lat/long) coordinates.  There is no support for elevations, and
or for translating between different ellipsoids, or datums. 

I propose the following changes to the coordinate system definitions:

 o Add a +towgs84=a,b,c[,d,e,f,g] option for providing the 3 or 7 parameter
   relationship between this coordinate systems datum, and WGS84. 

 o Adding a +datum=<datumname> option which will basically lookup the datum name
   in an internal table, substituting the +towgs84= and the ellipse definition
   that is contained in the table. 
 
 o Adding a +ld[id] command option for listing the datum table with definitions
   in a manner similar to the handling of ellipsoids and projections.

 o Adding +proj=latlong as a legal "projection" meaning that the coordinates
   are in geodetic coordinates rather than a projection system.  

We also need a way of driving coordinate system to coordinate system conversion
from the command line.  I torn between extending the ``proj'' command with
some methodology of defining a second coordinate system, or implement a new
command which operates coordinate system to coordinate system.  Perhaps a
proj2proj command or something like that.  I am open to suggestions on this.

I propose to implement several new API entry points, while leaving the
current API essentially unchanged.  The only changes to the current API
would be that pj_init would understand the new options (+towgs84, +datum)
and would store the additional information in the PJ structure. 

The new API entry point would likely be:

 int pj_transform( PJ *projSrc, PJ*projDst, int point_count, 
                   double *x, double *y, double *z );

The return value would be some sort of success/error indicator, and the function
would transform the list of points between the source coordinate system and the
destination coordinate system.  As needed it would take care of translations
between
projected coordinates and lat/long, and ellipsoid shifts of datum shifts between
geodetic coordinate systems.  Notes:

 o If no datum shifting information is provided, but the projSrc, and projDst
   have different ellipsoid definitions, the geodetic coordinates would be
   translated into geocentric coordinates on the source ellipsoid, and then back
   to geodetic coordinates on the second ellipsoid.  

 o The changes in elevation implied by changing ellipsoids, and datum shifting
is
   accounted for. 

 o The Z elevation value is always in meters.  Later we may want to add an
optional
   scaling factor. 

 o Multiple points can be handled in one call in order to reduce per-point 
   function call overhead.  

Unrelated to the datum shifting changes, I also propose to add a variation on
pj_init() which takes a single string argument with the coordinate system 
arguments, and will take care of parsing it into internal tokens in the usual
way.  Perhaps this could be pj_init_1().

I would appreciate feedback on the above proposals. 

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerda at home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush    | Geospatial Programmer for Rent
----------------------------------------
OSRS PRoject PROJ Discussion List
To Subscribe: send a message to majordomo at remotesensing.org with 'subscribe osrs-proj' in the body
To Unsubscribe: send a message to majordomo at remotesensing.org with 'unsubscribe osrs-proj' in the body
To Report Problems: send a message to owner-osrs-proj at remotesensing.org



More information about the Proj mailing list