diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-01-06 22:43:25 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2022-01-06 22:43:25 +0100 |
| commit | 5df594d25d8e362a3e4501cb2736dad88a7b0fc6 (patch) | |
| tree | bfe769907691083bc9b0169847b568f939fcef05 /test/unit/test_c_api.cpp | |
| parent | 1254a211beac3f479d193794508a3fcea4f8790f (diff) | |
| download | PROJ-5df594d25d8e362a3e4501cb2736dad88a7b0fc6.tar.gz PROJ-5df594d25d8e362a3e4501cb2736dad88a7b0fc6.zip | |
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 291d40bc..8a323376 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -3797,22 +3797,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); } |
