[OSRS-PROJ] Datum Shifting

Craig Bruce csbruce at cubewerx.com
Tue Jul 4 18:41:12 EDT 2000


Frank Warmerdam <warmerda at home.com> wrote:

> The new API entry point would likely be:
>
>  int pj_transform( PJ *projSrc, PJ*projDst, int point_count,
>                    double *x, double *y, double *z );

One minor issue with this function prototype is that for efficient
processing, it implies a coordinate organization that I don't think is
very common.  I think it is more common to use vectors of either structures
of { double x; double y; [double z;] } or a vector of 2-d or 3-d vectors
of coordinates.

If you wanted to fully generalize the interface, you could add an
'interleave' parameter that gives the number of 'double's between
successive coordinates.  For the order implied by the given function,
the interleave would be 1; for a vector of 2-d vectors, the interleave
would be 2; etc.  Internally, the function would do someting like "x +=
interleave" to go to the next X coordinate.

Personally, I'm also sequeamish about using 'int's for counts (I'd use
at least a 'long' if not a "proper" 'size_t').

------------------------------------------------------------------------------
Dr. Craig Bruce           |  csbruce at cubewerx.com  |             CubeWerx Inc.
Senior Software Developer |           --           |  200 Montcalm, Suite R-13
Ph. (819) 771-8303 x205   |   csbruce at pobox.com    |     Hull, Quebec, J8Y 3B5
Fax (819) 771-8388        | http://www.csbruce.com |  http://www.cubewerx.com/
------------------------------------------------------------------------------
           "Only works with Microsoft products" != "Interoperable"
----------------------------------------
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