"Fossies" - the Fresh Open Source Software Archive

Member "libgeotiff-1.6.0/test/testlistgeo" (21 Apr 2020, 8193 Bytes) of package /linux/privat/libgeotiff-1.6.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "testlistgeo": 1.5.1_vs_1.6.0.

    1 :
    2 # Test listgeo
    3 
    4 TEST_CLI_DIR=`dirname $0`
    5 DATA_DIR=`dirname $0`/data
    6 
    7 EXE=$1
    8 
    9 usage()
   10 {
   11     echo "Usage: ${0} <path to 'listgeo' program>" 
   12     echo
   13     exit 1
   14 }
   15 
   16 if test -z "${EXE}"; then
   17     EXE=../bin/listgeo
   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=testlistgeo_out
   30 
   31 rm -f ${OUT}
   32 
   33 echo "Testing listgeo byte.tif" >> ${OUT}
   34 $EXE ${DATA_DIR}/byte.tif >>${OUT}
   35 echo "" >>${OUT}
   36 
   37 echo "Testing listgeo byte_v11.tif" >> ${OUT}
   38 $EXE ${DATA_DIR}/byte_v11.tif >>${OUT}
   39 echo "" >>${OUT}
   40 
   41 echo "Testing listgeo pcs_32064.tif" >> ${OUT}
   42 $EXE ${DATA_DIR}/pcs_32064.tif >>${OUT}
   43 echo "" >>${OUT}
   44 
   45 echo "Testing listgeo GeogPrimeMeridianGeoKey.tif" >> ${OUT}
   46 $EXE ${DATA_DIR}/GeogPrimeMeridianGeoKey.tif >>${OUT}
   47 echo "" >>${OUT}
   48 
   49 echo "Testing listgeo GeogGeodeticDatumGeoKey.tif" >> ${OUT}
   50 $EXE ${DATA_DIR}/GeogGeodeticDatumGeoKey.tif >>${OUT}
   51 echo "" >>${OUT}
   52 
   53 echo "Testing listgeo GeogAngularUnitsGeoKey_9114.tif" >> ${OUT}
   54 $EXE ${DATA_DIR}/GeogAngularUnitsGeoKey_9114.tif >>${OUT}
   55 echo "" >>${OUT}
   56 
   57 echo "Testing listgeo ProjLinearUnitsGeoKey_9036.tif" >> ${OUT}
   58 $EXE ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif >>${OUT}
   59 echo "" >>${OUT}
   60 
   61 echo "Testing listgeo ProjectedCSTypeGeoKey_28191_cassini_soldner.tif" >> ${OUT}
   62 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT}
   63 echo "" >>${OUT}
   64 
   65 echo "Testing listgeo cassini_soldner.tif" >> ${OUT}
   66 $EXE ${DATA_DIR}/cassini_soldner.tif >>${OUT}
   67 echo "" >>${OUT}
   68 
   69 echo "Testing listgeo ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif" >> ${OUT}
   70 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif >>${OUT}
   71 echo "" >>${OUT}
   72 
   73 echo "Testing listgeo new_zealand_mapping_grid.tif" >> ${OUT}
   74 $EXE ${DATA_DIR}/new_zealand_mapping_grid.tif >>${OUT}
   75 echo "" >>${OUT}
   76 
   77 echo "Testing listgeo ProjectedCSTypeGeoKey_29101_polyconic.tif" >> ${OUT}
   78 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_29101_polyconic.tif >>${OUT}
   79 echo "" >>${OUT}
   80 
   81 echo "Testing listgeo polyconic.tif" >> ${OUT}
   82 $EXE ${DATA_DIR}/polyconic.tif >>${OUT}
   83 echo "" >>${OUT}
   84 
   85 echo "Testing listgeo ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif" >> ${OUT}
   86 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif >>${OUT}
   87 echo "" >>${OUT}
   88 
   89 echo "Testing listgeo hotine_oblique_mercator_variant_a.tif" >> ${OUT}
   90 $EXE ${DATA_DIR}/hotine_oblique_mercator_variant_a.tif >>${OUT}
   91 echo "" >>${OUT}
   92 
   93 echo "Testing listgeo ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif" >> ${OUT}
   94 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif >>${OUT}
   95 echo "" >>${OUT}
   96 
   97 echo "Testing listgeo hotine_oblique_mercator_variant_b.tif" >> ${OUT}
   98 $EXE ${DATA_DIR}/hotine_oblique_mercator_variant_b.tif >>${OUT}
   99 echo "" >>${OUT}
  100 
  101 echo "Testing listgeo ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif" >> ${OUT}
  102 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif >>${OUT}
  103 echo "" >>${OUT}
  104 
  105 echo "Testing listgeo oblique_mercator_laborde.tif" >> ${OUT}
  106 $EXE ${DATA_DIR}/oblique_mercator_laborde.tif >>${OUT}
  107 echo "" >>${OUT}
  108 
  109 echo "Testing listgeo ProjectedCSTypeGeoKey_5456_lcc1sp.tif" >> ${OUT}
  110 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5456_lcc1sp.tif >>${OUT}
  111 echo "" >>${OUT}
  112 
  113 echo "Testing listgeo lcc1sp.tif" >> ${OUT}
  114 $EXE ${DATA_DIR}/lcc1sp.tif >>${OUT}
  115 echo "" >>${OUT}
  116 
  117 echo "Testing listgeo ProjectedCSTypeGeoKey_5329_mercator1sp.tif" >> ${OUT}
  118 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5329_mercator1sp.tif >>${OUT}
  119 echo "" >>${OUT}
  120 
  121 echo "Testing listgeo mercator1sp.tif" >> ${OUT}
  122 $EXE ${DATA_DIR}/mercator1sp.tif >>${OUT}
  123 echo "" >>${OUT}
  124 
  125 echo "Testing listgeo ProjectedCSTypeGeoKey_5641_mercator2sp.tif" >> ${OUT}
  126 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5641_mercator2sp.tif >>${OUT}
  127 echo "" >>${OUT}
  128 
  129 echo "Testing listgeo mercator2sp.tif" >> ${OUT}
  130 $EXE ${DATA_DIR}/mercator2sp.tif >>${OUT}
  131 echo "" >>${OUT}
  132 
  133 echo "Testing listgeo ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif" >> ${OUT}
  134 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif >>${OUT}
  135 echo "" >>${OUT}
  136 
  137 echo "Testing listgeo oblique_stereographic.tif" >> ${OUT}
  138 $EXE ${DATA_DIR}/oblique_stereographic.tif >>${OUT}
  139 echo "" >>${OUT}
  140 
  141 echo "Testing listgeo ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif" >> ${OUT}
  142 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif >>${OUT}
  143 echo "" >>${OUT}
  144 
  145 echo "Testing listgeo polar_stereographic_variant_a.tif" >> ${OUT}
  146 $EXE ${DATA_DIR}/polar_stereographic_variant_a.tif >>${OUT}
  147 echo "" >>${OUT}
  148 
  149 echo "Testing listgeo ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif" >> ${OUT}
  150 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif >>${OUT}
  151 echo "" >>${OUT}
  152 
  153 echo "Testing listgeo polar_stereographic_variant_b.tif" >> ${OUT}
  154 $EXE ${DATA_DIR}/polar_stereographic_variant_b.tif >>${OUT}
  155 echo "" >>${OUT}
  156 
  157 echo "Testing listgeo ProjectedCSTypeGeoKey_3814_transverse_mercator.tif" >> ${OUT}
  158 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif >>${OUT}
  159 echo "" >>${OUT}
  160 
  161 echo "Testing listgeo transverse_mercator.tif" >> ${OUT}
  162 $EXE ${DATA_DIR}/transverse_mercator.tif >>${OUT}
  163 echo "" >>${OUT}
  164 
  165 echo "Testing listgeo ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif" >> ${OUT}
  166 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif >>${OUT}
  167 echo "" >>${OUT}
  168 
  169 echo "Testing listgeo transverse_mercator_south_oriented.tif" >> ${OUT}
  170 $EXE ${DATA_DIR}/transverse_mercator_south_oriented.tif >>${OUT}
  171 echo "" >>${OUT}
  172 
  173 echo "Testing listgeo ProjectedCSTypeGeoKey_3812_lcc2sp.tif" >> ${OUT}
  174 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3812_lcc2sp.tif >>${OUT}
  175 echo "" >>${OUT}
  176 
  177 echo "Testing listgeo lcc2sp.tif" >> ${OUT}
  178 $EXE ${DATA_DIR}/lcc2sp.tif >>${OUT}
  179 echo "" >>${OUT}
  180 
  181 echo "Testing listgeo ProjectedCSTypeGeoKey_3083_albers_equal_area.tif" >> ${OUT}
  182 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif >>${OUT}
  183 echo "" >>${OUT}
  184 
  185 echo "Testing listgeo albers_equal_area.tif" >> ${OUT}
  186 $EXE ${DATA_DIR}/albers_equal_area.tif >>${OUT}
  187 echo "" >>${OUT}
  188 
  189 echo "Testing listgeo ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif" >> ${OUT}
  190 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif >>${OUT}
  191 echo "" >>${OUT}
  192 
  193 echo "Testing listgeo lambert_azimuthal_equal_area.tif" >> ${OUT}
  194 $EXE ${DATA_DIR}/lambert_azimuthal_equal_area.tif >>${OUT}
  195 echo "" >>${OUT}
  196 
  197 echo "Testing listgeo ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif" >> ${OUT}
  198 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif >>${OUT}
  199 echo "" >>${OUT}
  200 
  201 echo "Testing listgeo lambert_cylindrical_equal_area.tif" >> ${OUT}
  202 $EXE ${DATA_DIR}/lambert_cylindrical_equal_area.tif >>${OUT}
  203 echo "" >>${OUT}
  204 
  205 echo "Testing listgeo ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif" >> ${OUT}
  206 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif >>${OUT}
  207 echo "" >>${OUT}
  208 
  209 echo "Testing listgeo equidistant_cylindrical.tif" >> ${OUT}
  210 $EXE ${DATA_DIR}/equidistant_cylindrical.tif >>${OUT}
  211 echo "" >>${OUT}
  212 
  213 echo "Testing listgeo pixel_is_point_wgs84.tif" >> ${OUT}
  214 $EXE ${DATA_DIR}/pixel_is_point_wgs84.tif >>${OUT}
  215 echo "" >>${OUT}
  216 
  217 # Normalize for results depending on the exact version of PROJ / EPSG database
  218 sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp
  219 mv ${OUT}.tmp ${OUT}
  220 
  221 sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.tmp
  222 
  223 # do 'diff' with distribution results
  224 # after cleaning for avoid spurios result due 
  225 # to different build dir
  226 sed -e "s/Testing listgeo .*test/Testing listgeo ..\/test/"  -i ${OUT}
  227 echo "diff ${OUT} with testlistgeo_out.dist"
  228 diff -u ${OUT} testlistgeo_out.dist.tmp
  229 if [ $? -ne 0 ] ; then
  230     echo  ""
  231     echo "PROBLEMS HAVE OCCURRED"
  232     echo "test file ${OUT} saved"
  233     echo
  234     exit 100
  235 else
  236     echo "TEST OK"
  237     echo "test file ${OUT} removed"
  238     echo
  239     rm testlistgeo_out.dist.tmp
  240     /bin/rm -f ${OUT}
  241     exit 0
  242 fi