Select to view content in your preferred language

How to create bubble polygons - maybe buffer?

2943
4
01-24-2017 02:59 PM
by Anonymous User
Not applicable

Hello all,

How can I create the callout bubble polygons like in CAD and PDF mark-up software? Does anyone have some work arounds? I'm thinking about trying to use the buffer tool. I won't have the bubble effect but at least I'll have a circle around the lines.

I get asked to produce maps like this from time to time and it really sucks there's no bubble tool in ArcMap.

Thanks for ideas,

A

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

in order to replicate that you would have to buffer a series of points with dissolve selected.  Getting the correct point spacing would be a real pain.  Is there a chance that you could create that pattern as a point symbol then just use it to symbolize the points on the line rather than trying to symbolize the line.  Since you use this infrequently it probably falls into the 'nice' category rather than the 'need' one.

DarrenWiens2
MVP Honored Contributor

Maybe this will get you some of the way there (as usual, I cut some corners, but you get the idea):

>>> fc = 'myline_Buffer' # line already buffered
... pt_spacing = 10000
... buff_outline = [i[0].boundary() for i in arcpy.da.SearchCursor(fc,'SHAPE@')][0]
... outline_pts = []
... outline_buffers = []
... for i in range(0,int(buff_outline.length),pt_spacing):
...     cur_pt = buff_outline.positionAlongLine(i) # make points along buffer
...     outline_pts.append(cur_pt)
...     outline_buffers.append(cur_pt.buffer(pt_spacing/1.5)) # buffer and append to list
... int_lines = []
... for i in range(len(outline_buffers)):
...     if i == 0:
...         int_lines.append(outline_buffers[i].difference(outline_buffers[len(outline_buffers)-1]).boundary()) # take difference of first and last buffers
...     else:
...         int_lines.append(outline_buffers[i].difference(outline_buffers[i-1]).boundary()) # take difference of current buffer and previous buffer
... arcpy.CopyFeatures_management(outline_pts,r'in_memory\outline_pts')
... arcpy.CopyFeatures_management(outline_buffers,r'in_memory\outline_buffers')
... arcpy.CopyFeatures_management(int_lines,r'in_memory\int_lines')‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Finally, you would erase the original buffer from the lines. Here's the output of my script above:

by Anonymous User
Not applicable

Thanks for the ideas guys.

What I ended up doing: 1) export a data layer to CAD so they can find the area that needs to be bubbled. 2) make the CAD guy draw the bubble in CAD! 3) Add CAD drawing back into ArcMap, it reads the bubble as a polyline 4) export the polyline to a line feature class and done!

Sometimes the easiest solution isn't the first one I think of. 

0 Kudos
DarrenWiens2
MVP Honored Contributor

Haha - Step 1.) have someone else do it.