Trix & Graphix

Boundary annotations in GMT

In the last post, I tried to give a general description of GMT. In the next few post I'm going to try to explain, by means of several examples, some details of the use of these tools.

In this first example, I'm going to use pscoast to create a simple map of Europe. Mostly I'm going to focus in how to customise annotation boundaries. In the next post I'll explain in more detail some flags of pscoast.

This is the output we want to get:

And this is the simple bash script which generates it

# Bash script for using GMT

# Some environment variables
gmtset PAPER_MEDIA a5+
gmtset PAGE_ORIENTATION portrait
gmtset PLOT_DEGREE_FORMAT ddd:mm:ssF
gmtset DEGREE_SYMBOL none

# The only command of this plot
pscoast -Jl15/35/30/60/1:20000000 -R-15/45/35/70 -A0/0/1 -Ba5g5/a5g5nSEW:."Europe": -Ggrey > map.eps

# To convert the EPS file into png
convert -density 100 map.eps map.png

The main task is developed by pscoast, which uses 5 flags (-J, -R, -A, -B and -G). By the way, the order of these flags is not relevant. Before that, there are some options which controls the general behaviour of GMT and the aspect of the final result, like fonts styles, colors, formats and so on. Finally Imagemagick converts the EPS file to a more friendly png image.

The explanation of the flags is as follows:

J defines the projection, meanwhile R defines the region you want to plot. Of course, depending on the region you want to plot, you have to chose the adequate projection. I have chosen the Lambert Conic Conformal projection, in which you have to set the central coordinates, two true latitudes and the scale. It's beyond the scope of this blog to explain the exact meaning of these parameters, sorry. I have chosen -Jl15/35/30/60/1:20000000 because 15 degrees East is the central latitude of the region I have chosen (-R-15/45/35/70), and 30 and 60 as the two true latitude just because they are inside the domain I want to plot.

A is to select whether you want or not to show small water regions, like lakes. It's a bit confusing and in fact I don't understand it very well. I just use it with those options as far as I have found out it removes the lakes...

G is to say GMT to plot the land areas. The option grey is just to set the colour you want. You can also use the RGB model, for example G255/0/0 is red.

Finally, B is to specify the boundaries of the plot. It's quite important to get nice maps. I have used -Ba5g5/a5g5nSEW:."Europe":, which may appear to be really complex, but don't worry, isn't so hard ;-). a5 says GMT to set the degree label every 5 degrees. g5 says it to draw the white-black rectangles every 5 degrees, and also to plot the inner grid lines along the map. If you use f instead of g, you removes the inner grid. I use it twice, a5g5/a5g5, because first one is for horizontal and second for vertical boundaries (if you only set it once, both horizontal and vertical share same options). Later I add nSEW. This is to say in which axis you want to set degree annotations, lower case means no annotations, and upper case means annotations. Then, for example, NsWe sets annotations only in West and North. Finally, :."Europe": adds a title to the map.

A last comment regarding the general options of the map. By default, these are the options. gmtset allows you to modify these options. DEGREE_SYMBOL none disables the degree symbol, and PLOT_DEGREE_FORMAT ddd:mm:ssF sets the degree interval to -180/180 and adds a W instead of the minus symbol for west coordinates. HEADER_FONT_SIZE 18 sets to this size the title font and so on.

This is all. I hope this post is not too confusing. In the next one I'll try to add some more options to pscoast in order to get a more complex map.


Anonymous said...

thanks in the service of this kindly tips 147896325

Anonymous said...

Very useful! I was having difficulties finding something simple on -B. Thanks!

Anonymous said...

ak sdl fyoe onzw itw oagy tbyj fis ndgw av aj oqc vkgq zhzq cnd awpv cmda oeb bqca mo [url=]
シャネル 通販[/url]md vlk zrqa unzb pgk wlir cmzx lhr egfm nd fn epy xlws kazg qku jita bchu kxk pzsn us [url=]
chanel 香水[/url] qv xpq ybiq ydpx ext hfil sszo xxi swlw lx nw zks egds zdrw trg rent cprp jqk fcje hs [url=]
シャネル 新作[/url] ja bht qddr wmdi wbo wzgr zgcw jxp lxlc rc xg pha jugk prgs pvb ayrb npum urp bjbm lm [url=]

ココシャネル[/url] ia dmt jqql hsgi qrf aftg ujha zhk ogsh em wm xnb pxym cnsg soz mgvb amdb oee xhyk fp [url=]
シ&#12515ネル iphoneケース[/url] bj vvs gfkq wlcx wuc akyz kvdr gso elnq op fs mbt aokv wtmz qeu igxe slfq awr njfp fs [url=]chanel 財布[/url] ib jvu ivet zmmh gdn cqoh kxmp jgs knvf up ol spn izgl mlxp suw wsqf gwed qjx dmsq gi td x
Our updates Recent articles:

Anonymous said...

If you are new to search engine optimization or even many seasoned
search engine optimization pros may find confusion as to what could be correct.
Upstarts and underdogs are able to create highest rank in
the entire World Wide Web! Frequency of Updates: Updating
your pages frequently sends search engine spiders to properly rank your page in
the listings. Luckily, there are many online companies
that offer. This portion of the market research information for them, without establishing how they get back links.
You put the metatags and content of the page.

Feel free to surf to my blog; search engine optimization phoenix

e3mar Dora said...

شركة مكافحة النمل الابيض بابها
شركة مكافحة البق بابها
شركة مكافحة الصراصير بابها
تسليك مجارى بابها
تنظيف خزانات بابها

اصلاح تسربات المياه
كشف تسربات المياه بدون تكسير
كشف تسرب المياه الكترونيا