User Tools

Site Tools


Advance GDAL and OGR script

Gdal and OGR combined with awk and other bash commands can be used to create your own geotools.

Build up your geo-tools

Script: open by kate but do not modify ~/ost4sem/exercise/basic_adv_gdalogr/
Data: ~/ost4sem/exercise/basic_adv_gdalogr/input.tif
Directory: ~/ost4sem/exercise/basicadvgdalogr

Read the explanation carefully and try to understand the script, returning to the following questions:
1. line
Which is the format indicated by “-of AAIGrid”? What is its typical structure?
What indicates the $1 symbol?
Run only the first line using input.tif and open the gridasc.asc using more.
What is this file?
2. line
Explain the awk syntax. If you do not know, search on the Internet.
Run it. Open the file output. <code bash> cd ~/ost4sem/exercise/basic
adv_gdalogr sh input.tif output.asc </code> Use openev to check whether the pixel values are correct.

A more complicated script is this
Open it, study it and run! Enjoy!

Exercise: Using the catted images of your country run a or more complicate for all the images by a loop.

wiki/gdaladvance.txt · Last modified: 2021/01/20 20:36 (external edit)