aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-04-20 11:20:16 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-04-20 09:23:49 +0000
commit3d75435aa978588cf929a57286a2ae13d8ea128c (patch)
tree6307a5cdaa04ede9aa3624df03a025ebe7e85513 /test
parentcedc9789a1bd93e7ce919f99ed8914a9dd18b2a5 (diff)
downloadPROJ-3d75435aa978588cf929a57286a2ae13d8ea128c.tar.gz
PROJ-3d75435aa978588cf929a57286a2ae13d8ea128c.zip
Merge pull request #2678 from rouault/revert_ebe3425bf
Revert "proj_create_crs_to_crs_from_pj(): do not use PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION if area is specified"
Diffstat (limited to 'test')
-rw-r--r--test/unit/gie_self_tests.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/gie_self_tests.cpp b/test/unit/gie_self_tests.cpp
index 92f1c758..59b78497 100644
--- a/test/unit/gie_self_tests.cpp
+++ b/test/unit/gie_self_tests.cpp
@@ -804,6 +804,30 @@ TEST(gie, proj_create_crs_to_crs_outside_area_of_use) {
// ---------------------------------------------------------------------------
+TEST(gie, proj_create_crs_to_crs_with_area_large) {
+
+ // Test bugfix for https://github.com/OSGeo/gdal/issues/3695
+ auto area = proj_area_create();
+ proj_area_set_bbox(area, -14.1324, 49.5614, 3.76488, 62.1463);
+ auto P = proj_create_crs_to_crs(PJ_DEFAULT_CTX, "EPSG:4277", "EPSG:4326",
+ area);
+ proj_area_destroy(area);
+ ASSERT_TRUE(P != nullptr);
+ PJ_COORD c;
+
+ c.xyzt.x = 50; // Lat in deg
+ c.xyzt.y = -2; // Long in deg
+ c.xyzt.z = 0;
+ c.xyzt.t = HUGE_VAL;
+ c = proj_trans(P, PJ_FWD, c);
+ EXPECT_NEAR(c.xy.x, 50.00065628, 1e-8);
+ EXPECT_NEAR(c.xy.y, -2.00133989, 1e-8);
+
+ proj_destroy(P);
+}
+
+// ---------------------------------------------------------------------------
+
TEST(gie, proj_trans_generic) {
// GDA2020 to WGS84 (G1762)
auto P = proj_create(