fix imagemagick cache error

make sure daily.png is not dropped by imagemagick
adjust mapper startpoint and range
This commit is contained in:
tchncs 2016-12-18 16:40:01 +01:00
parent 25e2f35fca
commit 728a54edaa

View File

@ -10,9 +10,15 @@
set -e
export MAGICK_TMPDIR="/home/minetest/.im"
export MAGICK_MEMORY_LIMIT=4G
mapperdir="/home/minetest/tools/minetestmapper"
gdadir="/home/minetest/tools/gdal2tiles-leaflet"
cddir="/var/www/files/mapshots"
tiles="$cddir/tiles"
sourcedir="/var/minetest/illuna_world"
main="$cddir/daily.png"
@ -23,16 +29,14 @@ date=$(date "+%d-%m-%Y")
cd $cddir
cp -r $main $cddir/world_$DATE.png
rm -r $main
cd $mapperdir
./minetestmapper --geometry -10000:-5000+20000+20000 --bgcolor '#c7c7c7' --drawalpha --drawscale -i $sourcedir -o $main
./minetestmapper --geometry -10000:-12000+12000+12000 --bgcolor '#333333' --drawalpha --drawscale -i $sourcedir -o $main
cd $cddir
mogrify -resize 1000 -format jpg -quality 100 $main
cp daily.png daily.jpg
mogrify -resize 1000 -format jpg -quality 100 daily.png
mv daily.jpg daily_small.jpg
tar -cvjf $tarfile daily.png
python /home/minetest/tools/gdal2tiles-leaflet/gdal2tiles.py -l -p raster -z 0-10 -w none $main $tiles
python $gdadir/gdal2tiles.py -l -p raster -z 0-10 -w none $main $tiles