diff --git a/src/4D_api.cpp b/src/4D_api.cpp index 72a65b7456..e02cbf73ca 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -258,10 +258,10 @@ int pj_get_suggested_operation(PJ_CONTEXT*, // If two operations have the same accuracy, use the one that // is contained within a larger one (alt.accuracy == bestAccuracy && - alt.minxSrc > opList[iBest].minxSrc && - alt.minySrc > opList[iBest].minySrc && - alt.maxxSrc < opList[iBest].maxxSrc && - alt.maxySrc < opList[iBest].maxySrc && + alt.minxSrc >= opList[iBest].minxSrc && + alt.minySrc >= opList[iBest].minySrc && + alt.maxxSrc <= opList[iBest].maxxSrc && + alt.maxySrc <= opList[iBest].maxySrc && !isSpecialCaseForNAD83_to_NAD83HARN(opList[iBest]))) && !alt.isOffshore) ) { iBest = i; diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 2cbd7323f2..0900941f60 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -1747,8 +1747,8 @@ TEST_F(CApi, proj_create_operations) { auto op = proj_list_get(m_ctxt, res, idx); ASSERT_NE(op, nullptr); ObjectKeeper keeper_op(op); - // Transformation for USA - EXPECT_EQ(proj_get_name(op), std::string("NAD27 to NAD83 (1)")); + // Transformation for USA, using NADCON5 + EXPECT_EQ(proj_get_name(op), std::string("NAD27 to NAD83 (7)")); } {