BookmarkSubscribeRSS Feed
P5C768
Obsidian | Level 7

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;

id SRV_REGN;

choro SRV_REGN / nolegend html=SR_HTML;

run;

quit;

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!

2 REPLIES 2
GraphGuy
Meteorite | Level 14

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.

P5C768
Obsidian | Level 7

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!

sas-innovate-2024.png

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

Register now!

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
  • 2 replies
  • 885 views
  • 0 likes
  • 2 in conversation