BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AncaTilea
Pyrite | Level 9

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

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

5 REPLIES 5
ballardw
Super User

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.

Darrell_sas
SAS Employee

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. 

AncaTilea
Pyrite | Level 9

@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!

GraphGuy
Meteorite | Level 14

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

 

AncaTilea
Pyrite | Level 9

@GraphGuy

Thank you!

You are an endless resource!

 

Anca.

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
  • 5 replies
  • 1504 views
  • 1 like
  • 4 in conversation