blog authors
past blog entries
« Using LiDAR las files in next eCognition version | Main | ASPRS board approves LAS 1.3 specification »
Thursday
Aug062009

Offset points in ArcMap

Working with GIS, everyone encounters those problems that he knows there is a solution to, but he has no idea how to fix. Dealing with overlapping points has been a persistent example of such a problem for me. The other day, I was working with a file that contained several points with identical locations. In this case, the precise location of the points was less important than depicting the number of occurrences in the general region. I still wanted to show points on the map and did not want to show the number of occurrences in an enclosing polygon. Therefore, I needed a way to spread my points out.

After briefly scouring the ESRI site I found this guide for separating points based on labels. Essentially, this documents gives instructions to remove the symbols for the points in question and to enable the labels, but replacing the label text with symbols. Now symbols for the points show up where the labels would normally appear. I used this in conjunction with the labeling tools in the Maplex extension in ArcMap to gain a little more control over how the labels would be dispersed and to provide more offset.

This solution is only appropriate in certain scenarios, but it is a quick fix to a problem that I frequently encounter.

Does anyone else use a different solution to this problem?

Reader Comments (2)

I just was faced with a similar problem. But, rather than being concerned with the visual display of overlapping points, I was concerned that having multiple points in one location would throw off Local Moran's I analysis. I did some searching on the ESRI forums and found a toolbox someone created (http://forums.esri.com/Attachments/27079.zip). It was super easy to bring it into Arc and randomly offset all of my points to the distance that I specified (10 meters). Many thanks to Mr. Luke Pinner for sharing such a great tool!

In case that link gets messed up when ESRI switches to new forums, here's the code:
import sys, arcgisscripting, random
gp=arcgisscripting.create()

in_features=sys.argv[1]
maxdist=sys.argv[2]
out_features=sys.argv[3]

try:
if maxdist == '#': #Default to 1% of the width or height
ext = gp.describe(in_features).extent
ext=ext.split()
xmin = float(ext[0]);ymin=float(ext[1]);xmax = float(ext[2]);ymax=float(ext[3])
maxdist=max([xmax-xmin, ymax-ymin]) / 100.0

gp.CopyFeatures(in_features, out_features)
rows=gp.updatecursor(out_features)
row=rows.next()

while row:
pnt=row.shape.getpart(0)
pnt.x = random.uniform(0-float(maxdist),float(maxdist)) + pnt.x
pnt.y = random.uniform(0-float(maxdist),float(maxdist)) + pnt.y
row.shape=pnt
rows.updaterow(row)
row=rows.next()
del row
del rows

out_layer = gp.makefeaturelayer(out_features, "RandomlyShuffledPoints")
#gp.setparametersastext(3, out_layer) #This doesn't work, dunno why
del gp
except:
gp.addmessage("Failed:")
gp.addmessage(gp.getmessages())
raise

July 14, 2010 | Unregistered CommenterEllen

I had a similar problem while working for U of Illinois Chicago. I found a good group that addressed this issue at http://groups.google.com/group/comp.soft-sys.gis.esri/browse_thread/thread/43487e4bb9b8055f?pli=1

You might want to link to there, as the forum talks about GIS and the overlapping points problem.

Regards,
Michael Sheng
labels

July 24, 2010 | Unregistered CommenterMichael Sheng
Editor Permission Required
You must have editing permission for this entry in order to post comments.