Skip to content

Commit

Permalink
pj_get_suggested_operation(): tune so that NADCON5 grid is used for N…
Browse files Browse the repository at this point in the history
…AD27->NAD83 on CONUS
  • Loading branch information
rouault committed Dec 15, 2022
1 parent 785f6d7 commit 66a97e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/4D_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/test_c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)"));
}

{
Expand Down

0 comments on commit 66a97e0

Please sign in to comment.