Contrary to popular belief, command line tools are not dead. This one (well known across the world as GDAL) should be a part of any well prepared mapping professionals toolbox. Here we will explain how to get started with it and some of it’s uses.
Because the download location could change over time, the best starting point would be the GDAL Home Page. From there you may follow these steps (applicable at this time).
- Under the User Oriented Documentation section, click on Downloads.
- Under the Windows section, determine the best download location.
- Follow the installation instructions provided and use one of the paths mentioned above.
Current Best Choice
- Use the link to Tamas Szekeres site, currently http://www.gisinternals.com/sdk/.
- In the second section (GDAL and MapServer latest release versions), choose the highest MSVC release and Win32 or Win64 (depending on your system). If you have a modern 64bit machine choose (at this time) the MSVC2010 (Win64) link.
- First download and install the gdal-####-core.msi file, labeled “Generic installer for the GDAL core components”.
- Optionally download and install the plugins listed at the bottom, especially consider the ECW, FileGDB and MrSID plugins.
After install, you should find the GDAL command line option under the Start button, All Programs > GDAL. For those with Windows 8, I’m sorry to hear it.
GDAL_TRANSLATE: Converting Grid File Formats
Say you’ve got yourself a nice big Erdas IMG file representing 1/9 arc second NED from the USGS and you want to convert it to something more usable. That’s where gdal_translate comes in, it even lets you clip out a portion of the file during the conversion.
C:...GDAL>gdal_translate -of GSBG "D:\Path\File.img" "D:\Path\File.grd"
Input file size is 1976, 1299
0...10...20...30...40...50...60...70...80...90...100 - done.
In this case we executed the command gdal_translate and told it the -of option (output format) with the format code of GSBG (Golden Software Binary Grid) then the input file followed by the output file. It’s a very good habit to enclose your file names in quotation marks, required if the path has spaces. Along these lines a great side tip, in Windows Explorer select a file, then shift+right click on it and choose Copy As Path.
It would be to your benefit to learn more about the use of GDAL. Especially see the section labeled GDAL Utility Programs at the GDAL home page. Although these are command line tools, they are extremely powerful and could extend your raster/vector capabilities.
Lastly, many thanks to Frank Warmerdam and others that made GDAL possible.