diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-01-07 15:16:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-07 15:16:41 +0100 |
| commit | a7577c936ba2d325b7e41b940adc60681805e922 (patch) | |
| tree | 217b777eb8c03e686434318ce771563b9a92f062 /test/unit/test_c_api.cpp | |
| parent | 78eee957b0eff8b74df8a1f0e60a95355e7fa1c6 (diff) | |
| parent | 5df594d25d8e362a3e4501cb2736dad88a7b0fc6 (diff) | |
| download | PROJ-a7577c936ba2d325b7e41b940adc60681805e922.tar.gz PROJ-a7577c936ba2d325b7e41b940adc60681805e922.zip | |
Merge pull request #3013 from rouault/fix_3012
proj_get_crs_info_list_from_database(): report PJ_TYPE_GEODETIC_CRS for IAU_2015 -ocentric geodetic CRS (fixes #3012)
Diffstat (limited to 'test/unit/test_c_api.cpp')
| -rw-r--r-- | test/unit/test_c_api.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index f7cf03cc..3e6ef1ab 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -3787,22 +3787,27 @@ TEST_F(CApi, proj_get_crs_info_list_from_database) { params->typesCount = 1; auto type = PJ_TYPE_GEODETIC_CRS; params->types = &type; - auto list = proj_get_crs_info_list_from_database(m_ctxt, "EPSG", params, - &result_count); + auto list = proj_get_crs_info_list_from_database(m_ctxt, nullptr, + params, &result_count); bool foundGeog2D = false; bool foundGeog3D = false; bool foundGeocentric = false; + bool foundGeodeticCRS = + false; // for now, only -ocentric ellipsoidal IAU CRS for (int i = 0; i < result_count; i++) { foundGeog2D |= list[i]->type == PJ_TYPE_GEOGRAPHIC_2D_CRS; foundGeog3D |= list[i]->type == PJ_TYPE_GEOGRAPHIC_3D_CRS; foundGeocentric |= list[i]->type == PJ_TYPE_GEOCENTRIC_CRS; + foundGeodeticCRS |= list[i]->type == PJ_TYPE_GEODETIC_CRS; EXPECT_TRUE(list[i]->type == PJ_TYPE_GEOGRAPHIC_2D_CRS || list[i]->type == PJ_TYPE_GEOGRAPHIC_3D_CRS || - list[i]->type == PJ_TYPE_GEOCENTRIC_CRS); + list[i]->type == PJ_TYPE_GEOCENTRIC_CRS || + list[i]->type == PJ_TYPE_GEODETIC_CRS); } EXPECT_TRUE(foundGeog2D); EXPECT_TRUE(foundGeog3D); EXPECT_TRUE(foundGeocentric); + EXPECT_TRUE(foundGeodeticCRS); proj_get_crs_list_parameters_destroy(params); proj_crs_info_list_destroy(list); } |
