MCPcopy Create free account
hub / github.com/OSGeo/gdal / MITABCoordSys2SpatialRef

Function MITABCoordSys2SpatialRef

ogr/ogrmitabspatialref.cpp:2323–2343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2321/************************************************************************/
2322
2323OGRSpatialReference *MITABCoordSys2SpatialRef(const char *pszCoordSys)
2324
2325{
2326 TABProjInfo sTABProj;
2327 if (MITABCoordSys2TABProjInfo(pszCoordSys, &sTABProj) < 0)
2328 return nullptr;
2329 OGRSpatialReference *poSR = TABFileGetSpatialRefFromTABProj(sTABProj);
2330
2331 // Report on translation.
2332 char *pszWKT = nullptr;
2333
2334 poSR->exportToWkt(&pszWKT);
2335 if (pszWKT != nullptr)
2336 {
2337 CPLDebug("MITAB", "This CoordSys value:\n%s\nwas translated to:\n%s",
2338 pszCoordSys, pszWKT);
2339 CPLFree(pszWKT);
2340 }
2341
2342 return poSR;
2343}
2344
2345/************************************************************************/
2346/* MITABSpatialRef2CoordSys() */

Callers 5

importFromMICoordSysMethod · 0.85
SetMIFCoordSysMethod · 0.85
GetSpatialRefMethod · 0.85
GetSpatialRefMethod · 0.85
GetSpatialRefMethod · 0.85

Calls 4

CPLDebugFunction · 0.85
exportToWktMethod · 0.45

Tested by

no test coverage detected