]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/server/dist/share/proj/testflaky
Adding pkg-precompiled tileserver-mapnik to avoid npm install
[simantics/district.git] / org.simantics.maps.server / server / dist / share / proj / testflaky
1 :
2 # Script to do some testing of flaky transformation that do not depend
3 # on datum files.
4 #
5 #
6 NAD_DIR=`dirname $0`
7 EXE=$1
8
9 usage()
10 {
11     echo "Usage: ${0} <path to 'cs2cs' program>"
12     echo
13     exit 1
14 }
15
16 if test -z "${EXE}"; then
17     EXE=../src/cs2cs
18 fi
19
20 if test ! -x ${EXE}; then
21     echo "*** ERROR: Can not find '${EXE}' program!"
22     exit 1
23 fi
24
25 echo "============================================"
26 echo "Running ${0} using ${EXE}:"
27 echo "============================================"
28
29 OUT=tf_out
30 #EXE=../src/cs2cs
31 #
32 echo "doing tests into file ${OUT}, please wait"
33 rm -f ${OUT}
34 #
35 echo "Test healpix inverse projection on sphere" >> ${OUT}
36 $EXE +proj=latlong +a=1 +lon_0=0 \
37  +to +proj=healpix +a=1 +lon_0=0  -f '%.'5'f' -I\
38  -E >>${OUT} <<EOF
39 0 0.7853981633974483
40 -1.5707963267948966 0
41 EOF
42 $EXE +proj=latlong +a=5 \
43  +to +proj=healpix +a=5 -f '%.'5'f' -I\
44  -E >>${OUT} <<EOF
45 0.0 0.0
46 0.0 3.9269908169872414
47 0.0 -3.9269908169872414
48 7.853981633974483 0.0
49 -7.853981633974483 0.0
50 -15.707963267948966 0.0
51 -11.780972450961723 7.853981633974483
52 -11.780972450961723 -7.853981633974483
53 1.437378399445537 5.364369216432778
54 1.437378399445537 -5.364369216432778
55 EOF
56
57 ##############################################################################
58 # Done!
59 # do 'diff' with distribution results
60 echo "diff ${OUT} with ${OUT}.dist"
61 diff -b ${OUT} ${NAD_DIR}/${OUT}.dist
62 if [ $? -ne 0 ] ; then
63         echo  ""
64         echo "PROBLEMS HAVE OCCURED"
65         echo "test file ${OUT} saved"
66     echo
67         exit 100
68 else
69         echo "TEST OK"
70         echo "test file ${OUT} removed"
71     echo
72         /bin/rm -f ${OUT}
73         exit 0
74 fi