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

Function GetEPSGCode

autotest/cpp/test_osr.cpp:431–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429}
430
431static int GetEPSGCode(OGRSpatialReference &oSRS)
432{
433 int nEPSG = 0;
434 auto pszEPSG = oSRS.GetAuthorityCode("PROJCS");
435 if (pszEPSG == nullptr)
436 {
437 pszEPSG = oSRS.GetAuthorityCode("GEOGCS");
438 }
439 if (pszEPSG == nullptr)
440 {
441 pszEPSG = oSRS.GetAuthorityCode("VERT_CS");
442 }
443 if (pszEPSG != nullptr)
444 {
445 nEPSG = atoi(pszEPSG);
446 }
447 return nEPSG;
448}
449
450// Test exportVertCSToPanorama
451TEST_F(test_osr, exportVertCSToPanorama)

Callers 1

TEST_FFunction · 0.85

Calls 1

GetAuthorityCodeMethod · 0.80

Tested by

no test coverage detected