Skip to content

Commit 720e728

Browse files
committed
Import from ESRI WKT: remove special case of renaming UPS_North / UPS_South which appears to be undesirable
1 parent 20cd53c commit 720e728

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/iso19111/io.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4388,15 +4388,7 @@ WKTParser::Private::buildProjectedCRS(const WKTNodeNNPtr &node) {
43884388

43894389
const std::string projCRSName = stripQuotes(nodeP->children()[0]);
43904390
if (esriStyle_ && dbContext_) {
4391-
// It is likely that the ESRI definition of EPSG:32661 (UPS North) &
4392-
// EPSG:32761 (UPS South) uses the easting-northing order, instead
4393-
// of the EPSG northing-easting order
4394-
// so don't substitute names to avoid confusion.
4395-
if (projCRSName == "UPS_North") {
4396-
props.set(IdentifiedObject::NAME_KEY, "WGS 84 / UPS North (E,N)");
4397-
} else if (projCRSName == "UPS_South") {
4398-
props.set(IdentifiedObject::NAME_KEY, "WGS 84 / UPS South (E,N)");
4399-
} else if (cartesianCS) {
4391+
if (cartesianCS) {
44004392
std::string outTableName;
44014393
std::string authNameFromAlias;
44024394
std::string codeFromAlias;

test/unit/test_io.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7325,9 +7325,11 @@ TEST(wkt_parse, wkt1_esri_ups_north) {
73257325
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
73267326
ASSERT_TRUE(crs != nullptr);
73277327

7328-
EXPECT_EQ(crs->nameStr(), "WGS 84 / UPS North (E,N)");
7328+
EXPECT_EQ(crs->nameStr(), "WGS 84 / UPS North (N,E)");
73297329
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->direction(),
73307330
AxisDirection::SOUTH);
7331+
// Yes, inconsistency between the name (coming from EPSG) and the fact
7332+
// that with ESRI CRS, we always output E, N axis order
73317333
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->abbreviation(), "E");
73327334
EXPECT_EQ(crs->coordinateSystem()->axisList()[1]->direction(),
73337335
AxisDirection::SOUTH);
@@ -7355,9 +7357,11 @@ TEST(wkt_parse, wkt1_esri_ups_south) {
73557357
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
73567358
ASSERT_TRUE(crs != nullptr);
73577359

7358-
EXPECT_EQ(crs->nameStr(), "WGS 84 / UPS South (E,N)");
7360+
EXPECT_EQ(crs->nameStr(), "WGS 84 / UPS South (N,E)");
73597361
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->direction(),
73607362
AxisDirection::NORTH);
7363+
// Yes, inconsistency between the name (coming from EPSG) and the fact
7364+
// that with ESRI CRS, we always output E, N axis order
73617365
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->abbreviation(), "E");
73627366
EXPECT_EQ(crs->coordinateSystem()->axisList()[1]->direction(),
73637367
AxisDirection::NORTH);

0 commit comments

Comments
 (0)