BookmarkSubscribeRSS Feed
ChrisHemedinger
Community Manager

What sort of shapefiles do you have?  Something that PROC MAPIMPORT can support?

See this example:

Using 3rd party shape files to build map charts in SAS - The SAS Dummy

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
7 REPLIES 7
phelipegp
Calcite | Level 5

I can draw the shapefile as a map on SAS, what I need to do is use that map with some stats related to each "county" and create a heat or distribution map from there. After that, transform the map on SAS format to .kml because I need to plot then with Google Earth. I will look at the links you guys posted here, if I have any new questions i will come back here, thanks a lot!

ChrisHemedinger
Community Manager

My colleague Leonid Batkhan has a series of articles about integrating SAS data with Google Maps.  Perhaps they might help:

http://blogs.sas.com/content/sgf/tag/google-maps/

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
phelipegp
Calcite | Level 5

Good Morning Chris! Your tutorial helped a lot! Now I can create a proper map with data values, now the only thing I need is convert the datamap into a .kml file, do you know if that is possible? The tutorial from Leonid Batkhan also helped with some codes but in general it was not really useful because it shows how to plot a map directly into google maps and I need the .kml because I need to share this file between a lot of areas into my company. Thanks in advance.

ChrisHemedinger
Community Manager

There are several conference papers that discuss methods for creating KML.  Here are some:

http://support.sas.com/resources/papers/proceedings10/220-2010.pdf

http://www2.sas.com/proceedings/forum2008/253-2008.pdf

You can search for more on support.sas.com, or the useful SAS paper index site: http://lexjansen.com/.  Just search for "KML".

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
phelipegp
Calcite | Level 5

Hello again Chris!

I tried to make it works with those tutorials but I have made no progress, I can create a proper map with SAS, everything works really fine, but the problem is to export those maps in a format that google earth can read. The tutorials you already presented really seems to help, but I am newbie on SAS (Only 2 months of experience) and I have access only to SAS Enterprise Guide, there is no other way or a proper paper wich explain how to do the export process with Enterprise Guide? Thanks a lot, you are really helping me : D

ChrisHemedinger
Community Manager

I'm happy to hear that you've got your maps working in SAS.  The process to export KML is not automated in SAS Enterprise Guide, so you'll have to drop into a SAS program to accomplish it.

To produce a map in SAS Enterprise Guide, you're combining two data sources: a map data set with geospatial data and region identifiers, and a response data set that has the data you want to plot, also segmented by some region identifier.  PROC GMAP allows you to specify those two sources, indicate the ID variable, and then it performs the magic to produce the map.

To create a KML file, you need to provide code that does what PROC GMAP does -- combine the two data sources (MAP and response).  Then you use SAS code to emit that data to an output file in the KML format.  The first paper I referenced provides some examples for how to do that.  You might be able to find others by searching more paper archives or posting into the SAS/GRAPH forum.

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
MikeZdeb
Rhodochrosite | Level 12

Hi ... if you start with shapefiles and want to convert them to KML using SAS, take a look at ...

Converting shapefiles to KML for viewing in Google Earth and Google Maps - sasCommunity

ps  If you try the above and have any problems, Frank Boscoe's (a friend and the creator of the code on the above link) web site is ...

http://www.albany.edu/~fboscoe/

and there is a link to contact Frank on that page.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 7 replies
  • 1955 views
  • 4 likes
  • 3 in conversation