![]() |
The final example is designed to show-off the full power and flexibility of the WARMreader macros. For this, the underlying graphic is a map of the world, originally created by the CIA [7], which has been scanned and made publically available at the University of Texas [8], in JPEG format. A POSTSCRIPT version was made, to be able to use it with LATEX's graphics commands; but first some image processing was done to lighten the colour shades, for use with this example. Latitude and longitude values for 120 cities can be found in a file CityData.m that comes with Mathematica[9]. Using the following command
\WARMprocessMAP{CityData.m}%
{PoliticalMap}{ps}{bb}
the file PoliticalMap.bb is first read to obtain the
bounding-box information, and other data that allows the
coordinate system to be adapted to that region of the graphic
containing the world map.
That the map is presented using the Robinson projection,
and the longitude of its center, are also supplied in this file.
Next CityData.m is read to obtain coordinates for the cities.
Some calculations,
amounting to quadratic interpolation of tabulated values,
are required to convert the latitude and longitude into
appropriate rectangular coordinates on the map projection.
Dots marking each city are placed using \xyShowMarkPoints,
and commands such as \xyMarkedPos{New York}
enable annotations to be attached, wherever desired.