/edl-scripts/tif2bil.py
http://alageospatialportal.googlecode.com/ · Python · 17 lines · 11 code · 4 blank · 2 comment · 3 complexity · eb1e93fd90f42bba03d0f60f643375fe MD5 · raw file
- #!/usr/bin/python
- import os
- import shutil
- import edlconfig
- for root, dirs, files in os.walk(edlconfig.dataset):
- for name in files:
- if ".tif" in name:
- layername = name.replace(".tif","")
- print(layername)
- # os.system(edlconfig.gdalapps+"/gdal_translate -of EHdr " + os.path.join(root,name) + " " + os.path.join(root,layername) + ".bil")
- command = edlconfig.gdalapps+"/gdalwarp -te 109.51 -44.37 157.28 -8.19 -tr 0.01 -0.01 -s_srs '" + edlconfig.s_srs + "' -t_srs '" + edlconfig.t_srs + "' -of EHdr -srcnodata -9999 -dstnodata -9999 " + os.path.join(root,layername) + ".tif " + os.path.join(root,layername) + ".bil"
- print(command)
- os.system(command)