All pastes #734436 Raw Edit

tsdogs

public text v1 · immutable
·published 2007-10-12 18:30 UTC
rendered paste body
# creare il file XXX.gfw
# horz pixel to m (ex. 1.19)
# 0
# 0
# vert pixel to m (ex. -1.19)
# longitude in mercator
# altitude in mercator

# insert the metadata
cd srcimg
for i in `ls *.gfw`; do
  file=`echo $i | sed -e 's/\.gfw//'`
 # gdal_translate -a_srs epsg:54004  $i $tiff
  gdal_translate -a_srs '+proj=merc +datum=WGS84 +ellps=WGS84 +no_defs' $file.gif $file.tif
done

# create the rasters
gdalwarp  -of gtiff -ot byte `ls *.tif` ../map.tif
gdal_translate  -co tiled=yes -co blockxsize=128 -co blockysize=128 -co compress=deflate -co predictor=1 ../map.tif ../mapgeo.tif
cd ..
# create the views
gdaladdo --config COMPRESS_OVERVIEW DEFLATE mapgeo.tif 2 4 8 16 32 64