[gdal-dev] Issue with WKT to proj4

David J. Bakeman dbakeman at comcast.net
Sat May 28 17:49:43 EDT 2011


Frank Warmerdam wrote:
> On 11-05-27 06:49 PM, David J. Bakeman wrote:
>> Frank Warmerdam wrote:
>>> On 11-05-27 04:42 PM, David J. Bakeman wrote:
>>>> Is there a valid proj4 description of the following coordinate 
>>>> system in wkt?
>>>>
>>>> GEOGCS["WGS84_ds",
>>>> DATUM["D_WGS_1984",
>>>> SPHEROID["WGS_1984",6378137.0,298.257223563]],
>>>> PRIMEM["Greenwich",0.0],
>>>> UNIT["Second",0.00000484813681109536]]
>>>>
>>>
>>> David,
>>>
>>> I do not believe there is any way to make PROJ.4 use angular units 
>>> other
>>> than decimal degrees for geographic coordinate systems (+proj=latlong).
>> I thought that ogr used proj4 to do the coordinate transform? Does 
>> that mean
>> that ogr2ogr is converting using it's own transforms? It is 
>> converting the
>> shape correctly.
>
>
> David,
>
> While in theory OGR can use other coordinate system transformation
> libraries, in practice this is not used.   I don't know how ogr2ogr
> could be handling something in arcseconds properly.
I believe that I've figured it out.  When ogr2ogr transforms the feature 
it calls  OGRProj4CT::TransformEx in this method if the source is 
latlong it multiplies it by dfSourceToRadians first before calling proj4 
to do the transform.  Then after the transform it does the same 
multiplication with dfTargetFromRadians if the target is latlong.

Earlier in the calling sequence, OGRProj4CT::Initialize, it derives 
those values from the units which in the case of the wkt in these cs's 
are either degree or second with an appropriate multiplier.


>
> Best regards,



More information about the gdal-dev mailing list