Click here to see the SAS code.
Click here to see the example.

---------------------------------------------------------------

Although sas can't really do geographical maps with contour-like shading,
this example shows that it's possible to *combine* an image of such a 
map with a SAS/Graph map...

In v9.2 (with device=png) annotated images can look _very_ good, 
and therefore it is now possible to annotate very high-resolution
images onto a SAS/Graph map (without losing quality & the image
getting grainy).

In this example, I got a USGS map from the following location:

 http://earthguide.ucsd.edu/earthguide/maps/images/us_geologic.jpg

The map shows geologic formations on the united states.

I then annotated this map 'behind' a SAS/Graph US map.
The tricky part is to get the maps to line up just right.
One key to this trick is picking the right map "projection"
(as used by sas/graph 'proc gproject').  Another trick is 
adding a little blank space on the left & right of the sas
map, so you have a little extra room to manuever the image
you're trying to line up with the map.  Then adjust the 
coordinates (in the macro variables at the top of the program)
until the image lines up correctly with the map.

Sorry, but you can't really use long/lat coordinates to line 
them up, since the USGS map is already "projected" - we don't
have the software to "unproject" the image, so we could then 
line it up via long/lat coordinates.

What functionality does SAS/Graph add to this map? ...
First there's the visual aspect - sas/graph adds the capability 
of state outlines, and the annotated city markers, and the titles.  
Then, if you're using ods html web output, sas adds the capability 
of adding html charttips & drilldowns (in this map, I have added
charttips to the states so you can hover your mouse over them
and see the state names, and drilldowns on the annotated city 
stars so you can click on them and drilldown to the google map).

Oh - and I just picked these cities at "random" - some of them 
are in geologically "interesting" locations :)

Back to Samples Index