convert ALKIS NAS convois to GeoPackage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

convert_alkis_nas.sh 433B

12345678910111213141516171819
  1. #!/bin/bash
  2. srs=${4:-"EPSG:25832"}
  3. format=${3:-"gpkg"}
  4. outfile=${2:-"alkis_`date -I`.$format"}
  5. srcdir=${1:-"."}
  6. function cleanup { rm -f $srcdir/*.{xml,gfs} }
  7. trap cleanup EXIT
  8. echo "unpacking $srcdir/*.gz"
  9. gunzip -dkf $srcdir/*.gz
  10. for f in $srcdir/*.xml; do
  11. # tested for alkis data RhlPfalz on fedora 27 (ogr2ogr 2.1.4)
  12. echo "adding $f to $outfile"
  13. ogr2ogr "$outfile" -f "$format" -append -update -a_srs "$srs" "$f"
  14. done