[gdal-dev] "Times" projection in GDAL

Jed O. Kaplan jed.kaplan at unil.ch
Tue Mar 25 02:43:00 PDT 2014


Dear Dmitriy,

Thanks again for your reply. I think you are right, there is support in GDAL for the Times projection, but the projection itself needs to be defined in proj4 somehow. When I try to run ogr2ogr with a simple world coastline file and project it into the Times projection using the wkt you provided or something similar, I get the error message listed below. Using another projection, for example -t_srs EPSG:3395 works properly, so I don’t think this is a problem with my proj4 library.

I will take my question over to the proj4 list and see if anyone can help me to add a new projection.

Thanks again,

Jed

--

jkaplan at xsrv02:~/projections_test > ogr2ogr -f GMT -t_srs 7670.prj times ~/natural_earth_vector.sqlite ne_110m_coastline
ERROR 6: No translation for Times to PROJ.4 format is known.
ERROR 6: No translation for Times to PROJ.4 format is known.
Failed to create coordinate transformation between the
following coordinate systems.  This may be because they
are not transformable, or because projection services
(PROJ.4 DLL/.so) could not be loaded.
Source:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]
Target:
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.017453292519943295]],
    PROJECTION["Times"],
    PARAMETER["Central_Meridian",0.0],
    UNIT["Meter",1.0]]
ERROR 1: Terminating translation prematurely after failed
translation of layer ne_110m_coastline (use -skipfailures to skip errors)

--

On 25 Mar 2014, at 09:54, Dmitriy Baryshnikov <bishop.dev at gmail.com> wrote:

> 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.
> 
> 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