Data visualization with SAS programming

Add rivers to US map

Accepted Solution Solved
Reply
Super Contributor
Posts: 543
Accepted Solution

Add rivers to US map

Dear community,

 

I would like to add (overlay?) US rivers on a US map.

I have followed thispost (Thank you!):

 

https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/Add-water-areas-into-US-map/m-p/36815/high...

 

At first I only took one state as example - Delaware,that only has three counties- I downloaded the Areawater and Edges files corresponding to the counties in Delaware.

I GPROJECT the X,Y coordinates from the Edge sfiles (and Areawater)....

Bottom line, my projected values for coordinates are multipple time larger than the SAS Counties data coordinates.

 

I am wondering if there has been any progress since the post I am using as resource.

Or,

is there a better/easier way to add water information on a US map?

 

Thank you!

 


Accepted Solutions
Solution
‎04-15-2016 08:41 AM
SAS Employee
Posts: 963

Re: Add rivers to US map

I've put together a chapter on annotating points & paths onto a map in SAS. I think this has some information that would be very helpful to you. Page 24 is where "Annotating Paths" (which could also be used for rivers), but the earlier pages provide a lot of good background info that you should probably read first:

 

http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf

 

View solution in original post


All Replies
Grand Advisor
Posts: 9,748

Re: Add rivers to US map

When combining map sets they really have to come from the same coordinate system. The SAS MAPS datasets use an X Y that can be calculated for latitude and longitude. There is no guarantee about that from any shapefile. If you want to use water, or other features, that are in a shapefile then you want a shapefile prepared pretty much by the same process as the feature file.

 

OR spend, possibly a lot of time, identifying a few points in the two sets that are the exact same place on the ground and do an manual conversion.

 

So see if there is an appropriate US shapefile in the same place you get the features.

Start at http://www.census.gov/geo/maps-data/data/tiger-line.html likely with the "State and Equivalent" under the "File Availability" to get boundaries that will mesh with the other data files.

SAS Employee
Posts: 170

Re: Add rivers to US map

To add to Ballardw, you might also want to use the maps in the MAPSGFK libref instead of MAPS (it is much newer and up to date).  These maps are all in degrees and the variables LAT and LONG are unprojected. It is possible that your shapefile is unprojected too. Both your data set and shapefile data set should be projected together.  Combine them (using a flag variable on one of them), GRPROJECT them together, and then separate them back with the flag variable. 

Super Contributor
Posts: 543

Re: Add rivers to US map

[ Edited ]

@ballardw, @Darrell_sasHi, thank you for your reply; I will give it a try. I used to be able to use this SAS community site, now I could barely find my post, so for the longest time I did not know I received an answer.

 

So thank you!

Solution
‎04-15-2016 08:41 AM
SAS Employee
Posts: 963

Re: Add rivers to US map

I've put together a chapter on annotating points & paths onto a map in SAS. I think this has some information that would be very helpful to you. Page 24 is where "Annotating Paths" (which could also be used for rivers), but the earlier pages provide a lot of good background info that you should probably read first:

 

http://robslink.com/SAS/book2/Chapter_07_Annotating_on_Maps.pdf

 

Super Contributor
Posts: 543

Re: Add rivers to US map

@RobertAllison_SAS

Thank you!

You are an endless resource!

 

Anca.

Post a Question
Discussion Stats
  • 5 replies
  • 381 views
  • 1 like
  • 4 in conversation