# How to make unique points for multiple points in mdb

2396
4
08-22-2014 07:00 AM
New Contributor III

I have an access mdb that has multiple records that match to single parcels.  I would like to create a point for each record that matches to the appropriate parcels.  I made the parcels into points and then joined the database but this only got me one point per parcel.  Any thought as to how to automate this?

Thanks!

Tags (2)
1 Solution

Accepted Solutions
Esri Esteemed Contributor

You could calculate the centroid of the parcels:

1.  Open the attribute table

2.  Add a field of type 'Double'

3.  Right-click the field > Calculate Geometry > X Coordinate of Centroid

4.  Repeat steps for Y Coordinate of Centroid

Next, join the parcels to the access table.  Now, each record of the access table will have the XY coordinates.  You can then create a point for each row by right-clicking on the table > Display XY Data.

4 Replies
Esri Esteemed Contributor

You could calculate the centroid of the parcels:

1.  Open the attribute table

2.  Add a field of type 'Double'

3.  Right-click the field > Calculate Geometry > X Coordinate of Centroid

4.  Repeat steps for Y Coordinate of Centroid

Next, join the parcels to the access table.  Now, each record of the access table will have the XY coordinates.  You can then create a point for each row by right-clicking on the table > Display XY Data.

New Contributor III

Jake-

Thanks!  Worked like a charm!

Cheers,

New Contributor III

Okay, now I have all of the points but they are all on top of each other.  Can you think of a way that I can offset them a bit?  I want my field crews to be able to see how many points there are.

Cheers!

Esri Esteemed Contributor

After joining the parcels to the table, export the table to a new table.  You can then add an offset to the coordinates by iterating through each record using python before displaying the XY Event Layer.  Below is an example:

```import arcpy
from arcpy import env
#set workspace to geodatabase
env.workspace = r"C:\temp\python\test.gdb"

#specify table
table = "Owners_Export"

dict = {}

#iterate through the table and add the Parcel PIN to a dictionary
with arcpy.da.SearchCursor(table, ["PIN", "CentroidX"]) as cursor:
for row in cursor:
dict[row[0]] = row[1]

del cursor

#for each PIN, add 0.2 to the X coordinate
for PIN in dict.values():
x = 0.2
with arcpy.da.UpdateCursor(table, ["CentroidX"]) as cursor:
for row in cursor:
row[0] = row[0] + x
x += 0.2
cursor.updateRow(row)

del cursor
```