aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-09-29 10:01:48 +0200
committerEven Rouault <even.rouault@spatialys.com>2018-10-01 11:17:41 +0200
commit1583a566a208d2451fb1acc8bcf16fbd8151983e (patch)
treeca39958e17c92e3e13ca3db46ce86698b67d5a35 /test
parent72f27ce4702a3ace56a85573f565853aacd7e640 (diff)
downloadPROJ-1583a566a208d2451fb1acc8bcf16fbd8151983e.tar.gz
PROJ-1583a566a208d2451fb1acc8bcf16fbd8151983e.zip
Add geographic offset transformation method.
The Geographic offsets transformation adds an offset to the geographic longitude, latitude coordinates, and an offset to the ellipsoidal height. This method is normally only used when low accuracy is tolerated. It is documented as coordinate operation method code 9619 (for geographic 2D) and 9660 (for geographic 3D) in the EPSG dataset. It can also be used to implement the method Geographic2D with Height Offsets (code 9618) by noting that the input vertical component is a gravity-related height and the output vertical component is the ellispoid height (dh being the geoid undulation). It can also be used to implement the method Vertical offset (code 9616) It is used for example to transform: - from the old Greek geographic 2D CRS to the newer GGRS87 CRS - from Tokyo + JSLD69 height to WGS 84 - from Baltic 1977 height to Black Sea height It is also useful to document the implicit zero-offset transformation we do in pipelines such as +proj=pipeline +step +inv +proj=longlat +ellps=A +step +proj=longlat +ellps=B that can be explicited as +proj=pipeline +step +inv +proj=longlat +ellps=A +step +proj=geogoffset [+dlon=0 +dlat=0 +dh=0] +step +proj=longlat +ellps=B
Diffstat (limited to 'test')
-rw-r--r--test/gie/more_builtins.gie32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie
index 96212cba..d3fe64f6 100644
--- a/test/gie/more_builtins.gie
+++ b/test/gie/more_builtins.gie
@@ -557,6 +557,38 @@ expect 0 -90
-------------------------------------------------------------------------------
+
+-------------------------------------------------------------------------------
+Test for PJ_geogoffset
+-------------------------------------------------------------------------------
+-------------------------------------------------------------------------------
+operation +proj=geogoffset
+-------------------------------------------------------------------------------
+direction forward
+tolerance 1mm
+
+accept 10 20
+expect 10 20
+roundtrip 1
+
+-------------------------------------------------------------------------------
+operation +proj=geogoffset +dlon=3600 +dlat=-3600 +dh=3
+-------------------------------------------------------------------------------
+direction forward
+tolerance 1mm
+
+accept 10 20
+expect 11 19
+roundtrip 1
+
+accept 10 20 30
+expect 11 19 33
+roundtrip 1
+
+accept 10 20 30 40
+expect 11 19 33 40
+roundtrip 1
+
-------------------------------------------------------------------------------
run the few gie-builtin tests, which are currently either awkward or impossible
to express in the gie command set