BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RandoDando
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.

 

RandoDando
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

 

RandoDando
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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 4 replies
  • 862 views
  • 1 like
  • 3 in conversation