diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2017-11-27 20:21:52 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2017-11-27 20:23:25 +0100 |
| commit | f0181b0a24d9d3a8bb593811945fea008128f94a (patch) | |
| tree | c4ef5fc40f00481755c86f383be839b7b81eac68 /test | |
| parent | 25b011042fdff451ca2826afe82251c06d883fb8 (diff) | |
| parent | 1f48f4c333bfe135296d3be643ef4981dc401c38 (diff) | |
| download | PROJ-f0181b0a24d9d3a8bb593811945fea008128f94a.tar.gz PROJ-f0181b0a24d9d3a8bb593811945fea008128f94a.zip | |
Merge remote-tracking branch 'osgeo/master' into docs-release-4.10.0
Diffstat (limited to 'test')
| -rw-r--r-- | test/gie/builtins.gie | 31 | ||||
| -rw-r--r-- | test/gie/ellipsoid.gie | 161 | ||||
| -rw-r--r-- | test/gie/more_builtins.gie | 38 |
3 files changed, 227 insertions, 3 deletions
diff --git a/test/gie/builtins.gie b/test/gie/builtins.gie index c6a801f8..6b820c01 100644 --- a/test/gie/builtins.gie +++ b/test/gie/builtins.gie @@ -502,6 +502,37 @@ expect -0.001790493 0.000895247 accept -200 -100 expect -0.001790493 -0.000895247 +=============================================================================== +Central Conic + Sph + lat_1 +=============================================================================== + +------------------------------------------------------------------------------- +operation +proj=pipeline +step +proj=ccon +lat_1=52 +lat_0=52 +lon_0=19 +a=6390000 +x_0=330000 +y_0=-350000 +step +proj=axisswap +order=1,-2,3,4 +------------------------------------------------------------------------------- +tolerance 0.00010 mm +accept 24 55 +expect 650031.54109413219363 4106.1617770643609028 +accept 15 49 +expect 37074.189007307473069 676826.23559270039774 +accept 24 49 +expect 696053.36061617843913 672294.56795827199940 +accept 19 52 +expect 330000.00000000000000 350000.00000000000000 + +direction inverse +accept 0 0 +expect 13.840227318521004431 55.030403993648806391 +accept 0 700000 +expect 14.514453594615022781 48.773847834747808675 +accept 700000 0 +expect 24.782707184271129766 55.003515505218481835 +accept 700000 700000 +expect 24.027610763560529927 48.750476070495021286 +accept 330000 350000 +expect 19.000000000000000000 52.000000000000000000 + =============================================================================== Central Cylindrical diff --git a/test/gie/ellipsoid.gie b/test/gie/ellipsoid.gie new file mode 100644 index 00000000..65101f6c --- /dev/null +++ b/test/gie/ellipsoid.gie @@ -0,0 +1,161 @@ +=============================================================================== + +Test pj_ellipsoid, the reimplementation of pj_ell_set + +=============================================================================== + + +BEGIN + +------------------------------------------------------------------------------- +First a spherical example +------------------------------------------------------------------------------- +operation proj=merc R=6400000 +------------------------------------------------------------------------------- +tolerance 10 nm +accept 1 2 +expect 111701.0721276371 223447.5262032605 + +accept 12 55 +expect 1340412.8655316452 7387101.1430967357 +------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------- +Then an explicitly defined ellipsoidal example +------------------------------------------------------------------------------- +operation proj=merc a=6400000 rf=297 +------------------------------------------------------------------------------- +tolerance 10 nm +accept 1 2 +expect 111701.0721276371 221945.9681832088 + +accept 12 55 +expect 1340412.8655316452 7351803.9151705895 +------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------- +Then try using a built in ellipsoid +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 +------------------------------------------------------------------------------- +tolerance 10 nm +accept 1 2 +expect 111319.4907932736 221194.0771604237 + +accept 12 55 +expect 1335833.8895192828 7326837.7148738774 +------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------- +Then try to fail deliberately +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80000000000 +expect failure errno unknown_ellp_param +operation proj=merc +a=-1 +expect failure errno major_axis_not_given +operation proj=merc +no_defs +expect failure errno major_axis_not_given + +# This one should succeed due to ellps=WGS84 in proj_def.dat +operation proj=merc +accept 0 0 +expect 0 0 + +operation proj=merc +es=-1 +expect failure errno major_axis_not_given + +operation +expect failure +operation cobra +expect failure +------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------- +Finally test the spherification functionality +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 R_A +tolerance 10 nm +accept 12 55 +expect 1334340.6237297705 7353636.6296552019 +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 R_V +tolerance 10 nm +accept 12 55 +expect 1334339.2852675652 7353629.2533042720 +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 R_a +tolerance 10 nm +accept 12 55 +expect 1333594.4904527504 7349524.6413825499 +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 R_g +tolerance 10 nm +accept 12 55 +expect 1333592.6102291327 7349514.2793497816 +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 R_h +tolerance 10 nm +accept 12 55 +expect 1333590.7300081658 7349503.9173316229 +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 R_lat_a=60 +tolerance 10 nm +accept 12 55 +expect 1338073.7436268919 7374210.0924803326 +------------------------------------------------------------------------------- +operation proj=merc ellps=GRS80 R_lat_g=60 +tolerance 10 nm +accept 12 55 +expect 1338073.2696101593 7374207.4801437631 +------------------------------------------------------------------------------- + + +------------------------------------------------------------------------------- +This one from testvarious failed at first version of the pull request +------------------------------------------------------------------------------- +operation proj=healpix a=1 lon_0=0 ellps=WGS84 +------------------------------------------------------------------------------- +accept 0 41.937853904844985 +expect 0 0.78452 +accept -90 0 +expect -1.56904 0 +------------------------------------------------------------------------------- + +------------------------------------------------------------------------------- +Shape parameters +------------------------------------------------------------------------------- +operation proj=utm zone=32 ellps=GRS80 rf=0 +expect failure errno rev_flattening_is_zero + +operation proj=utm zone=32 ellps=GRS80 es=1 +expect failure errno eccentricity_is_one + +operation proj=utm zone=32 ellps=GRS80 b=0 +expect failure errno eccentricity_is_one + +operation proj=utm zone=32 ellps=GRS80 b=6000000 +accept 12 55 +expect 699293.0880 5674591.5295 + +operation proj=utm zone=32 ellps=GRS80 rf=300 +accept 12 55 +expect 691873.1212 6099054.9661 + +operation proj=utm zone=32 ellps=GRS80 f=0.00333333333333 +accept 12 55 +expect 691873.1212 6099054.9661 + +operation proj=utm zone=32 ellps=GRS80 b=6000000 +accept 12 55 +expect 699293.0880 5674591.5295 + +operation proj=utm zone=32 a=6400000 b=6000000 +accept 12 55 +expect 700416.5900 5669475.8884 +------------------------------------------------------------------------------- + +END diff --git a/test/gie/more_builtins.gie b/test/gie/more_builtins.gie index 1e3ce185..8ac8a667 100644 --- a/test/gie/more_builtins.gie +++ b/test/gie/more_builtins.gie @@ -1,4 +1,3 @@ - =============================================================================== Various test material, mostly converted from selftest entries in PJ_xxx.c @@ -251,14 +250,47 @@ accept 3370658.378 711877.314 5349787.086 2017.0 expect 3370658.18890 711877.42370 5349787.12430 2017.0 accept 3370658.378 711877.314 5349787.086 2018.0 expect 3370658.18087 711877.42750 5349787.12648 2018.0 +------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -builtins +geocentric latitude ------------------------------------------------------------------------------- +operation proj=geoc ellps=GRS80 +accept 12 55 0 0 +expect 12 54.818973308324573 0 0 +roundtrip 1000 +accept 12 90 0 0 +expect 12 90 0 0 +accept 12 -90 0 0 +expect 12 -90 0 0 -END +accept 12 89.99999999999 0 0 +expect 12 89.999999999989996 0 0 +------------------------------------------------------------------------------- + +------------------------------------------------------------------------------- +some less used options +------------------------------------------------------------------------------- +operation proj=utm ellps=GRS80 zone=32 to_meter=0 +expect failure + +operation proj=utm ellps=GRS80 zone=32 to_meter=10 +accept 12 55 +expect 69187.5632 609890.7825 +------------------------------------------------------------------------------- + + + +------------------------------------------------------------------------------- +run the few gie-builtin tests, which are currently either awkward or impossible +to express in the gie command set +------------------------------------------------------------------------------- +builtins +------------------------------------------------------------------------------- + +END |
