Geography Reference
In-Depth Information
The other major switch used in generating the globe is -R . This specifies
the extent of the map we want to generate. In the case of the globe,
we obviously wanted the entire planet, so we specified an x range of
0 to 360 degrees and a y range of -90 to 90. The range is specified as
west/east/south/north. In our next example, we will use -R to constrain
our map to a smaller area.
The other switch of interest is -N1 . This tells GMT to draw national
boundaries in addition to the coastline. Other arguments to -N allow you
to draw state boundaries within the Americas and marine boundaries.
The -P switch simply sets the page orientation to portrait. Landscape is
the default.
A Flat Example
Let's shift gears a bit and look at another example of using GMT, this
time for a smaller area. For this example, we'll create a map of Alaska
and annotate it. As I said before, the -R switch controls the extent of
our map. Alaska ranges from about 172 degrees east longitude to 130
degrees west. Using 360 degrees for the entire globe, this translates to
a region extending from 172 degrees to 230 degrees.
For the Alaska map, we will use the Albers Equal Area Conic projection.
Looking at the syntax for pscoast reveals that this requires the use of
the -Jb switch. In this case, we use the lowercase b to indicate that we
will specify the size of the map using a scale. First let's look at the code
in gmt_alaska.sh :
Download gmt_alaska.sh
pscoast -Jb-154/50/55/65/1:12000000 -R172/230/51/72 -B10g5/5g5 -W1p/0/0/0 \
-I1/2p/0/192/255 -I2/2p/0/192/255 -I3/1p/0/192/255 -I4/1p/0/192/255 \
-G220/220/220 -S0/192/255 -L210/54/54/1000 -P -N1/1p/0/0/0 -Dl \
>gmt_alaska_coast.eps
This looks like quite a complex command, but it's really not too bad
once you get past all the numbers and slashes.
Projection
First note we specified the projection using -Jb-154/50/55/65/1:12000000 .
Let's pick that apart a bit to see what's happening. The Albers projec-
tion requires the longitude of the central meridian, the latitude of the
origin, and the latitude of the two standard parallels. That's what you
see specified as -154/50/55/65 . These are the standard values used for
the Albers projection in Alaska. You can actually specify any values
 
 
Search WWH ::




Custom Search