Data visualization with SAS programming

Problem adding HTML to PROC GMAP

Frequent Contributor
Posts: 84

Problem adding HTML to PROC GMAP

I have encountered a problem when trying to add a title to an html map.  I imported a shape file from ESRI (which had about 9 million data points), ran a GREDUCE, limited to density <=1 and then a GPROJECT and used the code below to map.

proc gmap data=SR_Proj map=SR_Proj;


choro SRV_REGN / nolegend html=SR_HTML;



Note: I am only using a data file equal to the map file to test the data boundaries.  The code above works when I exclude the HTML statement, but when I include it, I get the follwing error message and no map results:

ERROR: Integer divide by zero.

ERROR: Termination due to Floating Point Exception

I've been researching that error message and most of the results seem to do with divide by 0 errors, missing data errors and such (I have confirmed there is no missing data in my HTML field), not related to GMAP.  Any help is appreciated.  Thanks!

SAS Employee
Posts: 990

Re: Problem adding HTML to PROC GMAP

If your map isn't proprietary/secret, it would be great if you could get us a copy of it, so we can try to reproduce (and fix) this bug.  We would hopefully like to handle all cases with something more graceful than a divide-by-zero & Floating Point Exception! Smiley Happy

For your immediate need, perhaps we can come up with a work-around ... You mention that you're using the map also as your data=.  Since your map sounds like it's pretty big, could you maybe try creating a data= data set with just 1 single observation for each map area? (that way, gmap won't have to decide which of the multiple/duplicate sr_html variables to use).

If that doesn't work-around the problem, perhaps you could try subsetting the map to see if it works OK with the html on just a small subset.

If that doesn't work, could you post up the line(s) of code you're using to create the sr_html variable, and also do a proc print and post up what the output of the variable looks like?  Oh, and it might be useful to know what version of SAS you're using (9.2, 9.3?) in case it might be some bug that has recently been fixed.

Frequent Contributor
Posts: 84

Re: Problem adding HTML to PROC GMAP

Posted in reply to RobertAllison_SAS

I wish my map was secret, I would feel much cooler.  However, your idea of reducing it down to smaller areas did seem to work.  I was able to map about 12 states/60k records before I started getting the error, so it does seem to indicate a space issue.  Ultimately I was trying to add an html title to find areas I was missing (my ESRI data is a dissolve of zip codes to a office region level) and what I discovered was that I am only missing data where no zip code is assigned, such as some national parks and northwest Maine.  As always, thanks for the help Robert!

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation