8

So I have a bit of an issue of points with the same x and y that I need to display separately from themselves. Here is some history of this issue:

I have a database of incidents that happen over a county. These incidents join to a parcel fabric with a one-to-many relationship. So several incidents occur on one parcel. I need the incidents to be shown as a point feature class for a web mapping application. So I added the x and y centroid of the associated parcel and created the point feature class. This resulted in several points being drawn on top of each other as shown in this picture: Picture A

I converted the symbology to a representation with a 10 meter minimum gap between points which resulted in exactly what I was looking for as show in this picture: Picture B

Now this works great in ArcMap, but when uploaded to my web mapping app the points can only be identified at there original x and y. So when you identify points that have been spaced you get no result, but when you identify the center of the parcel you get several results.

What I would love to happen is to somehow return the xy of these representations and change xy of each point to that. I've tried a few programming solutions, but I haven't been able to solve it yet.

1 Answer 1

6

I ended up finding a pretty good programming way to work with this. I used an array to alter the x and y in the table before converting the table to point. This array simple placed the points around the centroid of the parcel. Heres the code:

for x in output:                  # output is a list of unique ID's of the table
    expr =  "UID like '" + str(x) + "'")
    Z = 0
    B = 1
    X = [0, 0,10,10, 10,  0,-10,-10,-10]
    Y = [0,10,10,00,-10,-10,-10,  0, 10]
    rows = arcpy.UpdateCursor("Table", expr)
    for row in rows:
        row.Northing = row.Northing + (Y[Z]*B)
        row.Easting = row.Easting + (X[Z]*B)
        Z = Z + 1
        if Z == 9:
            Z = 0
            B = B + 1
        rows.updateRow(row)

Here is what it ended up looking like: Image C

I hope this helps anyone else. If you have some questions let me know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.