diff options
| author | Didier Richard <didier.richard@ign.fr> | 2008-01-13 14:09:54 +0000 |
|---|---|---|
| committer | Didier Richard <didier.richard@ign.fr> | 2008-01-13 14:09:54 +0000 |
| commit | a7158d18c2620ddb1ce7cc3fe6e3eef28ca06031 (patch) | |
| tree | 4fd2559764e5826d9fa67099196c73a04e52e27f | |
| parent | 8a13dcb2cff26a16cc4f47b6a34bd08cbc72e6fb (diff) | |
| download | PROJ-a7158d18c2620ddb1ce7cc3fe6e3eef28ca06031.tar.gz PROJ-a7158d18c2620ddb1ce7cc3fe6e3eef28ca06031.zip | |
Add unit tests for some SRSs of IGNF authority.
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1430 4e78687f-474d-0410-85f9-8d5e500ac6b2
| -rw-r--r-- | nad/Makefile.am | 4 | ||||
| -rw-r--r-- | nad/proj_outIGNF.dist | 17 | ||||
| -rwxr-xr-x | nad/testIGNF | 106 |
3 files changed, 126 insertions, 1 deletions
diff --git a/nad/Makefile.am b/nad/Makefile.am index eae94601..1351bf7a 100644 --- a/nad/Makefile.am +++ b/nad/Makefile.am @@ -8,6 +8,7 @@ TEST27 = ./test27 TEST83 = ./test83 TESTNTV2 = ./testntv2 TESTVARIOUS = ./testvarious +TESTIGN = ./testIGNF pkgdata_DATA = GL27 nad.lst nad27 nad83 proj_def.dat world epsg esri \ esri.extra other.extra \ @@ -17,7 +18,7 @@ EXTRA_DIST = GL27 nad.lst nad27 nad83 pj_out27.dist pj_out83.dist td_out.dist \ proj_def.dat test27 test83 world epsg esri \ testvarious testntv2 ntv2_out.dist \ esri.extra other.extra \ - IGNF ntf_r93.gsb + IGNF ntf_r93.gsb testIGNF proj_outIGNF.dist install-data-local: $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @@ -47,6 +48,7 @@ check-local: $(TESTVARIOUS) $(CS2CSEXE) # $(TESTNTV2) $(CS2CSEXE) +# $(TESTIGNF) $(CS2CSEXE) clean-local: $(RM) $(TEST_DB) diff --git a/nad/proj_outIGNF.dist b/nad/proj_outIGNF.dist new file mode 100644 index 00000000..24432e90 --- /dev/null +++ b/nad/proj_outIGNF.dist @@ -0,0 +1,17 @@ + 600000.0000 2600545.4523 0.0000 652760.737 7033791.245 0.000 + 135638.3592 2418760.4094 0.0000 187194.062 6855928.882 0.000 + 998137.3947 2413822.2844 0.0000 1049052.257 6843776.562 0.000 + 600000.0000 2200000.0000 0.0000 649398.871 6633524.192 0.000 + 311552.5340 1906457.4840 0.0000 358799.172 6342652.486 0.000 + 960488.4138 1910172.8812 0.0000 1007068.686 6340907.237 0.000 + 600000.0000 1699510.8340 0.0000 645204.279 6133556.746 0.000 +1203792.5981 626873.17210 0.0000 1247610.438 6055822.838 0.000 + 2d20'11.4239243" 50d23'59.7718445" 0.0 179040.151 5610495.281 0.000 +-3d57'49.4051448" 48d35'59.7121716" 0.0 -303729.365 5410118.352 0.000 + 7d44'12.1439796" 48d35'59.7832558" 0.0 592842.794 5410120.550 0.000 + 2d20'11.4951975" 46d47'59.8029841" 0.0 179041.668 5209746.077 0.000 +-1d15'48.9240599" 44d05'59.8251878" 0.0 -96825.467 4909184.138 0.000 + 6d50'12.2276489" 44d06'00.0517019" 0.0 523880.022 4909191.143 0.000 + 2d20'11.7754730" 42d18'00.0824436" 0.0 179047.634 4708817.010 0.000 + 9d32'12.6680218" 41d24'00.3542556" 0.0 730783.054 4608637.873 0.000 +3356123.5400 1303218.3090 5247430.6050 3353421.023 1304074.545 5248934.985 diff --git a/nad/testIGNF b/nad/testIGNF new file mode 100755 index 00000000..3fee805f --- /dev/null +++ b/nad/testIGNF @@ -0,0 +1,106 @@ +: +# Script to test some points in IGNF managed SRS. +# The expected coordinates have been calculed by +# other means. +# Usually, the diff is less than 10 cm, except for +# the LAMBE to LAMB93 point 8 which is just out of +# the ntf_r93.gsb grid ! +# On the Reunion Island, the diff might be up to 1m. +# +EXE=$1 + +usage() +{ + echo "Usage: ${0} <path to 'cs2cs' program>" + echo + exit 1 +} + +if test -z "${EXE}"; then + echo "*** ERROR: Missing path to 'cs2cs' program." + usage +else + if test ! -x ${EXE}; then + echo "*** ERROR: Can not find '${EXE}' program!" + exit 1 + fi +fi + +echo "============================================" +echo "Running ${0} using ${EXE}:" +echo "============================================" + +OUT=proj_outIGNF +INIT_FILE=./IGNF +RES="-f %.3f" +# +echo "doing tests into file ${OUT}, please wait" +# +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >${OUT} <<EOF + 600000.0000 2600545.4523 0.0000 +EOF +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >>${OUT} <<EOF + 135638.3592 2418760.4094 0.0000 +EOF +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >>${OUT} <<EOF + 998137.3947 2413822.2844 0.0000 +EOF +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >>${OUT} <<EOF + 600000.0000 2200000.0000 0.0000 +EOF +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >>${OUT} <<EOF + 311552.5340 1906457.4840 0.0000 +EOF +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >>${OUT} <<EOF + 960488.4138 1910172.8812 0.0000 +EOF +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >>${OUT} <<EOF + 600000.0000 1699510.8340 0.0000 +EOF +$EXE +init=${INIT_FILE}:LAMBE +to +init=${INIT_FILE}:LAMB93 -E $RES >>${OUT} <<EOF +1203792.5981 626873.17210 0.0000 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF + 2d20'11.4239243" 50d23'59.7718445" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF +-3d57'49.4051448" 48d35'59.7121716" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF + 7d44'12.1439796" 48d35'59.7832558" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF + 2d20'11.4951975" 46d47'59.8029841" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF +-1d15'48.9240599" 44d05'59.8251878" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF + 6d50'12.2276489" 44d06'00.0517019" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF + 2d20'11.7754730" 42d18'00.0824436" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGF93G +to +init=${INIT_FILE}:GEOPORTALFXX -E $RES >>${OUT} <<EOF + 9d32'12.6680218" 41d24'00.3542556" 0.0 +EOF +$EXE +init=${INIT_FILE}:RGR92 +to +init=${INIT_FILE}:REUN47 -E $RES >>${OUT} <<EOF +3356123.5400 1303218.3090 5247430.6050 +EOF +# +# do 'diff' with distribution results +echo "diff ${OUT} with ${OUT}.dist" +diff -b ${OUT} ${OUT}.dist +if [ $? -ne 0 ] ; then + echo "" + echo "PROBLEMS HAVE OCCURED" + echo "test file ${OUT} saved" + echo + exit 100 +else + echo "TEST OK" + echo "test file ${OUT} removed" + echo + /bin/rm -f ${OUT} + exit 0 +fi |
