aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/iso19111/factory.cpp9
-rw-r--r--test/unit/test_c_api.cpp2
-rw-r--r--test/unit/test_factory.cpp9
3 files changed, 11 insertions, 9 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp
index 6eb03ad4..5d0ed69a 100644
--- a/src/iso19111/factory.cpp
+++ b/src/iso19111/factory.cpp
@@ -5308,7 +5308,7 @@ std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
std::string sql = "SELECT c.auth_name, c.code, c.name, c.type, "
"c.deprecated, "
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
- "a.name, NULL FROM geodetic_crs c " +
+ "a.description, NULL FROM geodetic_crs c " +
getSqlArea("geodetic_crs");
ListOfParams params;
if (d->hasAuthorityRestriction()) {
@@ -5319,7 +5319,8 @@ std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
sql += "SELECT c.auth_name, c.code, c.name, 'projected', "
"c.deprecated, "
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
- "a.name, cm.name AS conversion_method_name FROM projected_crs c " +
+ "a.description, cm.name AS conversion_method_name FROM "
+ "projected_crs c " +
getSqlArea("projected_crs") +
"LEFT JOIN conversion_table conv ON "
"c.conversion_auth_name = conv.auth_name AND "
@@ -5335,7 +5336,7 @@ std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
sql += "SELECT c.auth_name, c.code, c.name, 'vertical', "
"c.deprecated, "
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
- "a.name, NULL FROM vertical_crs c " +
+ "a.description, NULL FROM vertical_crs c " +
getSqlArea("vertical_crs");
if (d->hasAuthorityRestriction()) {
sql += " WHERE c.auth_name = ?";
@@ -5345,7 +5346,7 @@ std::list<AuthorityFactory::CRSInfo> AuthorityFactory::getCRSInfoList() const {
sql += "SELECT c.auth_name, c.code, c.name, 'compound', "
"c.deprecated, "
"a.west_lon, a.south_lat, a.east_lon, a.north_lat, "
- "a.name, NULL FROM compound_crs c " +
+ "a.description, NULL FROM compound_crs c " +
getSqlArea("compound_crs");
if (d->hasAuthorityRestriction()) {
sql += " WHERE c.auth_name = ?";
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index c20aec39..8e1dddfa 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -3397,7 +3397,7 @@ TEST_F(CApi, proj_get_crs_info_list_from_database) {
EXPECT_EQ(list[i]->south_lat_degree, -90.0);
EXPECT_EQ(list[i]->east_lon_degree, 180.0);
EXPECT_EQ(list[i]->north_lat_degree, 90.0);
- EXPECT_EQ(std::string(list[i]->area_name), "World");
+ EXPECT_EQ(std::string(list[i]->area_name), "World.");
EXPECT_EQ(list[i]->projection_method_name, nullptr);
} else if (code == "4978") {
found4978 = true;
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index 5ddc2387..37f546f1 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -3151,7 +3151,7 @@ TEST(factory, getCRSInfoList) {
EXPECT_EQ(info.south_lat_degree, -90.0);
EXPECT_EQ(info.east_lon_degree, 180.0);
EXPECT_EQ(info.north_lat_degree, 90.0);
- EXPECT_EQ(info.areaName, "World");
+ EXPECT_EQ(info.areaName, "World.");
EXPECT_TRUE(info.projectionMethodName.empty());
found4326 = true;
} else if (info.code == "4296") { // Soudan - deprecated
@@ -3180,9 +3180,10 @@ TEST(factory, getCRSInfoList) {
EXPECT_EQ(info.south_lat_degree, 0.0);
EXPECT_EQ(info.east_lon_degree, 6.0);
EXPECT_EQ(info.north_lat_degree, 84.0);
- EXPECT_EQ(info.areaName, "World - N hemisphere - 0\xC2\xB0"
- "E to 6\xC2\xB0"
- "E - by country");
+ EXPECT_TRUE(info.areaName.find("Between 0\xC2\xB0"
+ "E and 6\xC2\xB0"
+ "E, northern hemisphere") == 0)
+ << info.areaName;
EXPECT_EQ(info.projectionMethodName, "Transverse Mercator");
found32631 = true;
} else if (info.code == "3855") {