10-13-2014 01:20 PM
What sort of shapefiles do you have? Something that PROC MAPIMPORT can support?
See this example:
10-13-2014 10:00 PM
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!
10-14-2014 08:06 AM
My colleague Leonid Batkhan has a series of articles about integrating SAS data with Google Maps. Perhaps they might help:
10-14-2014 09:43 AM
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.
10-14-2014 01:26 PM
There are several conference papers that discuss methods for creating KML. Here are some:
You can search for more on support.sas.com, or the useful SAS paper index site: http://lexjansen.com/. Just search for "KML".
10-15-2014 01:09 PM
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
10-16-2014 08:20 AM
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.
10-16-2014 03:28 PM
Hi ... if you start with shapefiles and want to convert them to KML using SAS, take a look at ...
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 ...
and there is a link to contact Frank on that page.