1

I am currently trying to find a way to correlate 3 separate datasets as point shapefiles.

I would like to import all three shapefiles, and apply a 5 metre buffer to each point.

Then, for each point, I would like to select any other points within that 5 metre buffer from and add their respective point ID to the attribute table.

e.g. If point 1 from dataset A is within 5 metres of point 2 from dataset B, and point 3 from dataset C then the resultant attitubte table would be:

ID Dataset A ID Dataset B ID Dataset C

1 2 3

2 - -

3 - -

Even a long winded series of operators or scripting would work.

1
  • To prevent your question being closed as too broad for asking the same question about two products I have reduced its scope to be just about one.
    – PolyGeo
    May 13, 2016 at 21:35

1 Answer 1

1

The arcpy way of doing this would be (this method is for running two data sets at a time):

  1. After buffering each point layer, use Make Feature layer method on each point layer
  2. Define update cursor on the update layer
  3. Create a counter integer variable
  4. Within update cursor use select layer by attribute to select first update feature (FID or OID = 0 or whatever is the first number in the table)
  5. Use select layer by location to select all features from the other layer that intersects the selected feature of the update layer
  6. Use Get Count method to check if the other layer had selected features > 0
  7. Increment the counter variable + 1
  8. Use if condition, if select count > 0 than nest search cursor for the other layer within the if condition and apply row ID from other layer to update layer (e.g. updateROW[0] = updateROW[0] +' '+ otherROW[0]. This will only cursor through the selected features of the other layer.
  9. Continue looping.....

Next, re-run script for next combination of layers.

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.