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

I am trying to use the map mapsgfk.Us which has AK and HI in the lower left.  How do I go about plotting an annotate data set with normal X Y coordinates onto that?  Some of those points are in AK and HI, so I want them to appear on the modified location of that map.  An example would be helpful. 

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

If city centroids would be close enough for your points, you could use the x/y coordinates in mapsgfk.uscity, and annotate those onto mapsgfk.us.

 

The 'tricky' part about mapsgfk.us is that Alaska and Hawaii are moved, resized, and projected differently than the 48 contiguous states. Therefore, in order for you to annotate your own arbitrary lat/long coordinates onto mapsgfk.us, you would need to know exactly how to move, resize, and project the coordinates.

 

I've found that the easiest way to do that is to "create my own" US map, with Alaska & Hawaii moved/resized/projected the way I want them, and then I know what values to apply to my annotated lat/long. Here is one example where I've done that:

 

http://robslink.com/SAS/democd75/best_restaurants_2014_info.htm

 

View solution in original post

4 REPLIES 4
ballardw
Super User

Please define what you mean by "normal X Y" coordinates in this sense.

 

With the scale of that map I would be tempted, if at all practical, to find the location of the nearest city in the USCity data set and use the coordinates from that for the annotate X Y coordinates.

 

ewillisva
Pyrite | Level 9
I should have elaborated. By normal coordinates I mean latitude and
longitude.
GraphGuy
Meteorite | Level 14

If city centroids would be close enough for your points, you could use the x/y coordinates in mapsgfk.uscity, and annotate those onto mapsgfk.us.

 

The 'tricky' part about mapsgfk.us is that Alaska and Hawaii are moved, resized, and projected differently than the 48 contiguous states. Therefore, in order for you to annotate your own arbitrary lat/long coordinates onto mapsgfk.us, you would need to know exactly how to move, resize, and project the coordinates.

 

I've found that the easiest way to do that is to "create my own" US map, with Alaska & Hawaii moved/resized/projected the way I want them, and then I know what values to apply to my annotated lat/long. Here is one example where I've done that:

 

http://robslink.com/SAS/democd75/best_restaurants_2014_info.htm

 

ewillisva
Pyrite | Level 9
Thanks! When I first tried this I had copied the code when going from the Contiguous set to Alaska to Hawaii, and made the necessary changes. I had omitted the NODATELINE option in the GPROJECT procedure which caused Alaska to be distorted. Adding that option fixed it.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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