GMT Part 1: A basic map of South-Africa
Generic Mapping Tools (GMT) is a relatively unknown command line tool for geo and spatial analysis. I say unknown because I only know one other person who actually uses it. Looking for resources online does however indicate that some universities have courses teaching GMT, no such luck for me, I had to learn it myself. I’d say the learning curve is quite steep, the only tool I can compare it with right now is GNUPLOT, another really cool command line tool for creating high quality graphics.
To create your map is pretty easy, if you use a bash script it is even easier in my humble opinion. Let’s start off with a map of South-Africa directly from the command line:
First install gmt:
Now we can make a basic map directly from the command line:
Breaking the commands down make the syntax a little more understandable in bash. Feel free to use whatever editor you like. Lets do:
in your new .sh script
You should see this basic map of South-Africa:
Note that I converted is from postscript format to reduce size.
This breaks down the commands and when you need to you can just edit the script as you need to. Obviously this is the most basic of maps. I’ll try and get some more advanced maps as this blog evolves.