BookmarkSubscribeRSS Feed
Obsidian | Level 7
I would like to know how to add water areas such as lakes, rivers into a US map.

An example:
SAS Employee
First, you need a data source with the location information for the Lakes and the Rivers. The/Census Tiger files is one source of this information. The shapefiles are found at: You would need AREAWATER (lakes) and EDGES (rivers) data sets. I believe these are per county for each state, so you will need to download all that you are interested in. The number after the year in the filename is the FIPS code for the State and County.

Next, you can import the shapefiles into SAS with Proc MAPIMPORT. This will create a SAS data set.

After importing this data, you will need to subset only the information that you need. These datasets contain other feature information. The descriptions and definitions of the information can be found at Deciding what you want to see will be the hardest part.

Finally, after subsetting the data you need, you will need to create an annotate data set to use with Proc GMAP. Your code will need to do MOVE and DRAW annotate 'functions' to draw the points along the river or the areas of the lakes.

I have never actually done this with the rivers and lakes. I have done a similar thing to draw roads on a map from the census data and the process is similar. The road program is too large to publish here.

If you need further help. contact SAS Tech Support.
Meteorite | Level 14
You'll probably use the 'move' and 'draw' annotate functions to draw the rivers (as lines), but you might want to use the 'poly' and 'polycont' annotate functions to draw the lakes as a polygon (for example, if you want to fill the lake polygon with a blue color).



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3 in conversation