[OSRS-PROJ] Datum Shifting

Frank Warmerdam warmerda at home.com
Tue Jul 4 12:34:40 EDT 2000

Morten Hulden wrote:
> On Tue, 4 Jul 2000, Frank Warmerdam wrote:
> > 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.
> Isn't +proj=ob_tran already doing something similar (rotating from one
> projection to another). Could the existing code be used or extended to
> cover your changes?


As I understand it the current ``proj'' command only allows conversion between
a single projected coordinate system and geodetic (lat/long) coordinates on
the same ellipsoid.  In particular, there is no way to convert directly from
one projection to another since it is assume that all projection definition
information on the commandline relates to one definition. 

I could possibly add some sort of divider argument and assume that everything
after that divider is another coordinate system.  For instance, 

proj +proj=utm +zone=11 +ellps=clrk80 -to +proj=utm +zone=11 +ellpse=GRS80

The assumption being that everything before "-to" is the first coordinate
system, and everything after is the second.  If no "-to" flag is given, then
the second coordinate system would be the geodetic equivelent to the indicated
projected coordinate system. 

For instance:

 proj +proj=utm +zone=11 +ellps=clrk80

would be equivelent to:
 proj +proj=utm +zone=11 +ellps=clrk80 -to +proj=latlong +ellps=clrk80

and the inverse form would expand as expected:

 proj -I +proj=utm +zone=11 +ellps=clrk80 

would be the same as:

 proj +proj=latlong +ellps=clrk80 -to +proj=utm +zone=11 +ellps=clrk80

This approach ensures we just have one command, and a fairly graceful and 
backward compatible way of going from the current style to the two coordinate
system form.  It would also ensure I don't have to duplicate all the other
argument handling currently embedded in the proj command.  On the downside,
it might be tricky to make the current proj command support Z optional Z 
coordinates without breaking some existing behaviour. 

Do people prefer an approach like the above instead of a new proj2proj command?

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