Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to automatically generate an image which highlights a location from a global view.

Here is an example of what I would like to achieve: enter image description here

I am debating using python utilities such as mpl_toolkits.basemap,which examples can be seen here. But I was hoping to find an easier way from you GIS professionals.

This is for a small webpage, and it would be nice to have it automatically generated.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I found out how to do it using Generic Mapping Tool.

From the website: GMT is an open source collection of ~65 tools for manipulating geographic and Cartesian data sets (including filtering, trend fitting, gridding, projecting, etc.) and producing Encapsulated PostScript File (EPS) illustrations ranging from simple x-y plots via contour maps to artificially illuminated surfaces and 3-D perspective views; the GMT supplements add another ~70 more specialized tools. GMT supports over 30 map projections and transformations and comes with support data such as GSHHS coastlines, rivers, and political boundaries.

 # -JGlon0/lat0/size(in inches)
 # Define RGB colors after -S and -G (e.g. -S175/200/225)
 pscoast -JG10/20/4i -Rg -P -Sblue -Gtan -K > map.ps
 # Symbol shape and size in -Sa0.2i
 # Color in -G
 echo -10 -10 | psxy -J -Rg -P -Sa0.2i -Gred -W1p -O >> map.ps
 # The letter after -T determines the kind of raster image (j for JPG, g for PNG
 ps2raster map.ps -A -Tj

Will produce this:

enter image description here

Special thanks to Matthew Herman for helping me with this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.