Data visualization with SAS programming

GMAP trouble with census shape files

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

GMAP trouble with census shape files

I am working with the American Indian/Alaska Native/Native Hawaiian Area shape files, specifically looking at the South Dakota tribal regions. I am having a difficult time getting a US (or SD when looking at a subset) outline to overlay properly. I am creating an annotate data set from the maps.states to use as my outline. Any thoughts?

These are the South Dakota tribal areas that I have projected and mapped.

gmap2.png

Here is the failed overlay:

SD_Outline_Fail.png


Accepted Solutions
Solution
‎07-10-2013 03:25 PM
SAS Employee
Posts: 963

Re: GMAP trouble with census shape files

It's difficult to say, without seeing your code, and seeing what your imported shape files look like.

For the map to come out looking correct, you will need to make sure that both your state map and your imported boundary files have consistent X/Ys ... for example, since maps.states has the long/lat X/Ys in radians, you would want to convert your imported shape file to radians (if they are in degrees, or other), and you want to make sure the longitude (X) value is in 'westlong' (for the US, that would be a positive value, rather than negative).  You'll then want to combine the maps, and gproject them together.

Here is the closest example I have to what you're doing (I'm using maps.counties, rather than maps.states ... and I'm combining the map with some rectangular areas):

http://robslink.com/SAS/democd49/grid_map_info.htm

grid_map.png

View solution in original post


All Replies
Solution
‎07-10-2013 03:25 PM
SAS Employee
Posts: 963

Re: GMAP trouble with census shape files

It's difficult to say, without seeing your code, and seeing what your imported shape files look like.

For the map to come out looking correct, you will need to make sure that both your state map and your imported boundary files have consistent X/Ys ... for example, since maps.states has the long/lat X/Ys in radians, you would want to convert your imported shape file to radians (if they are in degrees, or other), and you want to make sure the longitude (X) value is in 'westlong' (for the US, that would be a positive value, rather than negative).  You'll then want to combine the maps, and gproject them together.

Here is the closest example I have to what you're doing (I'm using maps.counties, rather than maps.states ... and I'm combining the map with some rectangular areas):

http://robslink.com/SAS/democd49/grid_map_info.htm

grid_map.png

New Contributor
Posts: 2

Re: GMAP trouble with census shape files

Got it! Thanks!

Post a Question
Discussion Stats
  • 2 replies
  • 290 views
  • 0 likes
  • 2 in conversation