Geography Reference
In-Depth Information
Fill Colors
Next we specify the fill colors for the land and water areas using the
-G and -S switches and add the RGB values to specify the color. For
land we use a light gray with RGB values of 220/220/220 . For the water
0/192/255 gives us a nice cyan color. Keep in mind that we could also
use a pattern or shade for filling land and water areas.
Scale Bar
A scale bar can easily be added to the map using the -L switch. Scale
bars can be simple or fancy. In this case, we'll just create a simple one
and place it in an open area on the map. How do we know it's open?
Well, part of the process is running pscoast and tweaking the options
and then running it again until we get the look we want. To create the
scale bar, we need the latitude and longitude of the point where we
want to place it. Since scale varies as we move further from the equa-
tor, we also specify the latitude at which we want the scale calculated.
Lastly, we indicate the length the scale bar should span. The default
is kilometers, but you can append m for miles or n for nautical miles.
Putting it all together, we have -L210/54/54/1000 , which gives a 1,000 km
scale bar calculated at 54 degrees north latitude and originating at 210
degrees longitude and 54 degrees latitude.
The Last Bits
The remainder of the command tells pscoast to use portrait mode ( -P ),
draw country boundaries in black using a pen width of 1( -N1/1p/0/0/0 ),
and use the low-resolution data ( -Dl ). The low-resolution dataset is the
default, but we specified it here so you could see the syntax.
The Result
You can see the result of all these command switches and options in
Figure 11.3 , on the next page. We have a nice map of Alaska, with grid
lines, borders, and degree annotations. The land and water is filled as
we specified, and the scale bar is sitting nicely in the Gulf of Alaska.
Overlaying Data
Now that we have used most of the common options, let's look at one
more example with pscoast . This time we'll generate a world map and
overlay point data from a delimited text file. You can take that concept
and expand it to create overlays of multiple datasets. In this case, we
will overlay the location of registered Quantum GIS users throughout
the world.
 
 
Search WWH ::




Custom Search