aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-04-13 22:42:54 +0200
committerKristian Evers <kristianevers@gmail.com>2018-04-13 23:17:49 +0200
commit299135153e33869157ecd432dd0194743e959170 (patch)
treeaaf75f77a87f6ad4c5bdcefcd4a8ce4e2733b23c /test
parenta023410e98ae879567963fb04fbd6e43ec67a6ae (diff)
downloadPROJ-299135153e33869157ecd432dd0194743e959170.tar.gz
PROJ-299135153e33869157ecd432dd0194743e959170.zip
Fix segfault in deformation
When transforming coordinates outside the grid model the deformation operation failed spectatularly. This is now fixed by checking that the coordinate is inside the grid. If it isn't an error is returned and a debugging log message is issued. Closes #934
Diffstat (limited to 'test')
-rw-r--r--test/gie/deformation.gie8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/gie/deformation.gie b/test/gie/deformation.gie
index 55283b84..b6ca3e0f 100644
--- a/test/gie/deformation.gie
+++ b/test/gie/deformation.gie
@@ -23,6 +23,14 @@ accept -3004295.5882503074 -1093474.1690603832 5500477.1338251457
expect -3004295.7025 -1093474.2106 5500477.3444
roundtrip 5
+# Test that errors are reported for coordinates outside the grid.
+# Here we test 120W 40N which is well outside the alaska grid.
+accept -2446353.8001 -4237209.0750 4077985.572
+expect failure errno grid_area
+accept -2446353.8001 -4237209.0750 4077985.572 2000
+expect failure errno grid_area
+
+
-------------------------------------------------------------------------------
Test using both horizontal and vertical grids
-------------------------------------------------------------------------------