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

Here's how I got the data ...

-----

   http://www.ngdc.noaa.gov/mgg/gdas/gd_designagrid.html
   Your Grid Id: bobsas1
   Grid Database: ETOPO2 - 2-minute global relief
   x - Windows
   Lat/Lon (left defaults - lat(up/down) = 32S-36S , lon (across)=18E-23E
   Cell size - 2-minute  (then it switched to 3-minute)
   Cell params - default (2-byte integers, whole meters precision)
   Format: XYZ (lon,dat,depth), No Header, Space delimited, omit empty grid cells

   Clicked 'Design-A-Grid' button.
   Clicked 'Next-->' button
   Clicked 'Compress and Retrieve' button
   Clicked 'Retrieve' button
   Clicked 'save'
   Saved bobsas1.zip to my U:
   Then, after saving it, I unzipped it, which created a directory structure...
   There's a lot of 'junk', but the file I wanted was ...

      /u/realliso/bobsas1_data/bobsas1/bobsas1.xyz
      (I renamed that to bay.xyz in the current directory)

-----

I read this elevation data into a sas data set.
I then convert the elevation data set into a sas/graph annotate data set.
For each observation, I create a small 1-slice solid-color annotate "pie".
I then color the pie based on which elevation range it's in (the mountains
are shades of brown, the 'flatlands' are shades of green, and anything 
with a negative elevation below sea level is a shade of blue).

I also create an annotate data set with a 'grid' of lines and text labels
to show the long/lat lines.

I get a subset of maps.africa, with just the region of 'South Africa'.

I then combine my annotate data with map, and then do a map projection.
By projecting them together, that guarantees the map and the annotated elevation
colors will line up correctly.  After projecting them, I separate the map from
the annotate data sets, and use "proc gmap" to draw an empty/outline of the us 
map, and annotate my elevation colors in front of the map (at this super-close
zoomed-in granularity, the map edge doesn't line up 100% exactly with the 
elevation colors, so I draw the map outline 'behind' the colors, so it just
doesn't show up - the human eye can pick out it's own shoreline easily enough
by the distinction between the green & blue elevation colors).  

And, to add a "special touch", I use the gmap html= option to add an html
title= text charttip/flyover-text with the state name, and href= is coded
to allow the user to click on the state and drilldown to the National
Geophysical Data Center's page that shows their very-detailed 3d elevation
contour maps.

Back to Samples Index