[gdal-dev] "Times" projection in GDAL

Jed O. Kaplan jed.kaplan at unil.ch
Fri May 2 07:34:31 PDT 2014


Dear All,

I have added the “Times” projection to my private copy of proj4 and tested it. It works properly using proj and unproj.

Could anyone on this list maybe give me a little guidance as to how I can make GDAL aware of this new map projection so that I may use it with GDAL/OGR utilities?

If everything works, I’ll submit my updates back to the package maintainers.

Many thanks,

Jed

On 25 Mar 2014, at 11:49, Even Rouault <even.rouault at mines-paris.org> wrote:

> Selon Dmitriy Baryshnikov <bishop.dev at gmail.com>:
> 
>> Hi Even,
>> 
>> hfadataset.cpp near 3686 ln
>> else if( EQUAL(pszProjName, "Times") )
>> {
>> sPro.proNumber = EPRJ_TIMES;
>> sPro.proName = (char*) "Times";
>> sPro.proParams[4] = oSRS.GetProjParm(SRS_PP_CENTRAL_MERIDIAN)*D2R;
>> sPro.proParams[6] = oSRS.GetProjParm(SRS_PP_FALSE_EASTING);
>> sPro.proParams[7] = oSRS.GetProjParm(SRS_PP_FALSE_NORTHING);
>> }
>> 
>> also I try this code
>> OGRSpatialReference pSpaRef;
>> const char *pszWkt =
>> 
> "PROJCS[\"World_Times\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Times\"],PARAMETER[\"Central_Meridian\",0.0],UNIT[\"Meter\",1.0]]";
>> pSpaRef.importFromWkt((char **)&pszWkt);
>> char *pszPrtWKT = NULL;
>> pSpaRef.exportToPrettyWkt(&pszPrtWKT );
>> CPLFree(pszPrtWKT );
>> 
>> And OGRSpatialReference eat this WKT.
> 
> Ah ok, well it is just that it is valid WKT. But we cannot really tell that GDAL
> fully supports it currently. For example the Validate() method of
> OGRSpatialReference would return FALSE since it doesn't know the Times
> projection method, and which projection parameters are valid with it. And we
> don't have a OGRSpatialReference.SetTimes() method. And not mentionning
> importFromProj4/exportToProj4() (but we would need proj.4 support of it before
> of course)
> 
>> 
>> Best regards,
>>     Dmitry
>> 
>> 25.03.2014 12:35, Even Rouault пОшет:
>>> Dmitriy,
>>> 
>>> where did you find reference to the "times" projection in OGR ? I can't
>> find it.
>>> 
>>> Even
>>> 
>> 
>> 
> 
> 



More information about the gdal-dev mailing list