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

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

This is a somewhat over-simplified version of a globe, showing which
parts of the world are in "daylight" and which parts are in "night",
based on the current time (when the sas job is run) in Cary, NC (USA).

This is very much over-simplified, and doesn't take into consideration
the date/season, just the time (so, basically, only good on the spring
and fall "equinox") -- if I considered the season, then the northern
hemisphere would be more-lit during the summer.  I also don't worry
about daylight savings time.

A more sophisticated globe would be something more like this... 

 http://www.timeanddate.com/worldclock/sunearth.html


Note that for the 'shadow' effect, I'm using the new v9.3 support for
"alpha transparent" colors (which is pretty cool stuff!)  
I've also included some some commented-out code (in 2 places)
where you can modify the example to work ~ok prior to v9.3,
but without the transparent effect.

In this example, I annotate poly/polycont rectangles for the lat/long
grid, making them solid-filled if it's night, and 'empty' grid if it's
daytime.  Note that with the transparency, the solid-filled rectangles
get a dark outline (which is desireable in this case) because when two
gray transparent boxes meet on the edges, the transparent gray from
each box overlaps slightly, and therefore "doubles" the darkness.

Basically, I use color='a222222bb' for the solid colored gray polygons,
and print them on top of the map (when='a').

I also annotate blue solid rectangles "behind" the map, for the water.

You have to re-run the SAS code to get the current/right-now map,
therefore this would be a neat example to set up via SAS/Intrnet,
(or Stored Process) so it re-runs the code when user views the 
web page  :)

Back to Samples Index