Dozen of times you come across a pile of tiles of raster. In most cases to use them you want to merge them. This article describes how to do that using open source GDAL combined with good old batching under windows. A nice source of ASCII raster file just (September 2015) made available are Digital Terrain models from the United Kingdom. These can be found via https://data.gov.uk/ or directly via http://environment.data.gov.uk/ds/survey
Follow these steps
Using the dir command create a list of ASCII's
dir /b /s *.asc > listofascs.txt |
Create a batch file in your favorite (plain) text editor with the following line of code
c:\python27\python.exe c:\python27\lib\site-packages\osgeo\gdal_merge.py -n -9999 -v -o output.tif --optfile listofascs.txt |
Note! In this case Python in c:\Python27 is used including the gdal_merge.py (downloaded from github) under the osgeo site-package of Python27.
More information on the options of gdal_merge.py can be found on the utilities page of GDAL
In the last step you
can add a coordinate reference system to you file
select a subset of you image
c:\python27\lib\site-packages\osgeo\gdal_translate -projwin ulx uly lrx lry -of GTiff -a_srs EPSG:code input.format output.format |
where:
Make a nice visualisation in you favorite software. The picture below is created in QGIS2.10 using two cpt_city colorramps combined.
You may also want to use visual panels to communicate related information, tips or things users need to be aware of. |
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.