[gdal-dev] Geocentric system in OGR

Frank Warmerdam warmerdam at pobox.com
Tue Jan 27 14:28:00 EST 2009


Ung wrote:
> So, is the geocentric system supported now on GDAL1.6.0? And if so, how 
> may I create a geocentric reference? And if not, are there any 
> extensions to GDAL/OGR or PROJ that may have implemented it?

Ung,

No, geocentric coordinate systems are not supported by OGRSpatialReference
and OGRCoordinateTransformation classes.

There are no immediately plans to implement this since there is relatively
little interest, though if someone wanted to implement and support this
capability I'd be open to it, as long as it follows OGC's mechanism to
described geocentric coordinate systems in WKT.

> I have also looked into PROJ, there are a couple of functions to do 
> geocentric-geodetic conversions. Are there functions to convert from a 
> projective reference to either geodetic or geocentric systems? 

The pj_transform() function can be used to convert to/from geocentric.
A geocentric coordinate system can be described to PROJ like:

   +proj=geocent

for historical reasons it may still be necessary to describe an ellipse
for geocentric coordinate systems even though it is not meaningful.

eg.
cs2cs +proj=latlong +datum=WGS84 +to +proj=geocent +ellps=WGS84

 > Is there an API reference to PROJ?

If you have man pages it is "man pj_init" or:

   http://trac.osgeo.org/proj/wiki/man_pj_init

This doesn't help you a great deal though since it does not address the
supported coordinate system descriptions.

> Would prefer to use OGR than PROJ as it is object oriented. Any pointers 
> would be much appreciated!

I can think of more compelling reasons for wanting to do this through
OGR's facilities!

Really, pj_init() and pj_transform() aren't so scary.

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



More information about the gdal-dev mailing list