Created
January 11, 2012 19:34
-
-
Save frewsxcv/1596344 to your computer and use it in GitHub Desktop.
Taken from ami-07db196e to assist in OpenAerialMap workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export GDAL_TIFF_INTERNAL_MASK=YES | |
nearblack -co TILED=YES -setmask -nb 0 -of GTiff -o ./prewarp.tif $1 | |
gdalwarp -co TILED=YES -dstalpha -t_srs EPSG:4326 prewarp.tif warped.tif | |
rm prewarp.tif | |
gdal_translate -co TILED=YES -co JPEG_QUALITY=80 -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -b 1 -b 2 -b 3 -mask 4 warped.tif final.tif | |
rm warped.tif | |
gdaladdo final.tif 2 4 8 16 32 64 128 256 | |
mv final.tif ${1}_converted.tif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment