Dear community,
I would like to add (overlay?) US rivers on a US map.
I have followed thispost (Thank you!):
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!
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
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.
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.
@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!
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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.