| 637 | } |
| 638 | |
| 639 | const 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 | |
| 671 | PJ *OGRSpatialReference::Private::getGeodBaseCRS() |
| 672 | { |
no test coverage detected