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

Method nullifyTargetKeyIfPossible

ogr/ogrspatialreference.cpp:639–669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

637}
638
639const char *OGRSpatialReference::Private::nullifyTargetKeyIfPossible(
640 const char *pszTargetKey)
641{
642 if (pszTargetKey)
643 {
644 demoteFromBoundCRS();
645 if ((m_pjType == PJ_TYPE_GEOGRAPHIC_2D_CRS ||
646 m_pjType == PJ_TYPE_GEOGRAPHIC_3D_CRS) &&
647 EQUAL(pszTargetKey, "GEOGCS"))
648 {
649 pszTargetKey = nullptr;
650 }
651 else if (m_pjType == PJ_TYPE_GEOCENTRIC_CRS &&
652 EQUAL(pszTargetKey, "GEOCCS"))
653 {
654 pszTargetKey = nullptr;
655 }
656 else if (m_pjType == PJ_TYPE_PROJECTED_CRS &&
657 EQUAL(pszTargetKey, "PROJCS"))
658 {
659 pszTargetKey = nullptr;
660 }
661 else if (m_pjType == PJ_TYPE_VERTICAL_CRS &&
662 EQUAL(pszTargetKey, "VERT_CS"))
663 {
664 pszTargetKey = nullptr;
665 }
666 undoDemoteFromBoundCRS();
667 }
668 return pszTargetKey;
669}
670
671PJ *OGRSpatialReference::Private::getGeodBaseCRS()
672{

Callers 6

SetTargetLinearUnitsMethod · 0.80
GetTargetLinearUnitsMethod · 0.80
SetAuthorityMethod · 0.80
GetAuthorityCodeMethod · 0.80
GetAuthorityNameMethod · 0.80
GetAxisMethod · 0.80

Calls 1

EQUALFunction · 0.50

Tested by

no test coverage detected