| 2321 | /************************************************************************/ |
| 2322 | |
| 2323 | OGRSpatialReference *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() */ |
no test coverage detected