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

An example:
http://upload.wikimedia.org/wikipedia/commons/2/27/USA_Wisconsin_location_map.svg
2 REPLIES 2
Darrell_sas
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: ftp://ftp2.census.gov/geo/tiger/TIGER2010/. 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 http://www.census.gov/geo/www/tiger/tgrshp2010/documentation.html. 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.
GraphGuy
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).

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 744 views
  • 2 likes
  • 3 in conversation