maketiles.sh 1.3 KB

123456789101112131415161718192021
  1. #!/bin/sh
  2. # parallel: http://gis.stackexchange.com/questions/2336/converting-huge-geotiffs-to-tilepyramid
  3. # cp $(which gdal2tiles.py) .
  4. # curl http://trac.osgeo.org/gdal/raw-attachment/ticket/4379/gdal2tiles_parallelize_base_and_overview_tiles.patch > gdal2tiles_parallelize_base_and_overview_tiles.patch
  5. # patch gdal2tiles.py gdal2tiles_parallelize_base_and_overview_tiles.patch
  6. cd "$(dirname ""$0"")"
  7. GDAL_DIR=/Library/Frameworks/GDAL.framework/Versions/1.9/Programs
  8. GDAL_DIR=.
  9. GDAL_DIR=/usr/bin
  10. src="AV-KarteAllgaeuerLechtalerAlpen-2,1-1906.warp.tif"
  11. base_url="http://maps.dev.mro.name/dav/west"
  12. dir=tiles
  13. date
  14. # resampling: http://gis.stackexchange.com/questions/14781/converting-ordnance-survey-raster-maps-to-wgs84-webmap-tiles
  15. # antialias
  16. # bilinear
  17. nice "${GDAL_DIR}"/gdal2tiles.py --force-kml --url="$base_url" --googlekey="AIzaSyAvoB86uoFONxyj3OxDmjJmBkluR4SsAz0" --webviewer=all --title="Allgaeuer Alpen, Westliche Haelfte" --copyright="Leo Aegerter, 1907" --zoom=3-18 --resampling=bilinear --s_srs=EPSG:900913 --profile=mercator "$src" "$dir"
  18. # nice "${GDAL_DIR}"/gdal2tiles.py --force-kml --url="$base_url" --googlekey="AIzaSyAvoB86uoFONxyj3OxDmjJmBkluR4SsAz0" --webviewer=all --title="Allgaeuer Alpen, Westliche Haelfte" --copyright="Leo Aegerter, 1907" --zoom=3-18 --resampling=bilinear --s_srs=EPSG:4805 --profile=mercator "$src" "$dir"
  19. date