I have two point feature classes, each containing about fifty points. These 2 point feature classes should be merged, or the points of feature class 2 added to feature class 1, as feature class 2 does not contain any information, but only the points itself.

But if the distance between a point of feature class 1 and feature class 2 is smaller than 50 meters, they should be merged to one point.

The figure should illustrate the problem

enter image description here

How can I do this programmatically (with an ArcPy script)?

One way I could think of is:

  1. run buffer around feature class 1,
  2. delete points from feature class 2 that fall into the buffer,
  3. add remaining points of feature class 2 to feature class 1

How can I achieve this?

  • 1
    What GIS library for Python are you wanting to use to do this? ArcPy or something else? What is your code so far? Questions asking for code are expected to show a coding attempt.
    – PolyGeo
    Commented Nov 16, 2015 at 8:17
  • Sorry, I forgot this. Yes, I would like to use ArcPy. I don't have a code so far, I started to think conceptually about the problem. I don't know if my suggested workflow makes sense and which function/tool I could use to add the points of fc2 to fc1
    – the_chimp
    Commented Nov 16, 2015 at 8:20
  • 2
    Do you know how to write a script that buffers feature class 1? By showing what you have tried (your code so far) potential answerers are more likely to help with where you are stuck.
    – PolyGeo
    Commented Nov 16, 2015 at 9:06
  • If you have for example fc1a that has 2 features from fc2 (fc2c, and fc2d) within 50m, you only want to use fc1a and delete/not merge fc2c and fc2d?
    – artwork21
    Commented Nov 16, 2015 at 19:29
  • Exactly, I would then only one point to be kept
    – the_chimp
    Commented Nov 17, 2015 at 10:01

1 Answer 1


This is a point clustering problem. I would suggest to:

  1. merge two datasets into one feature class (use "Merge or Append")
  2. use "Grouping Analysis" tool to cluster the feature class
  3. Use "Mean Center" tool to calculate the mean center of your points by setting the "Case Field" as the clusters field.

This workflow can be chained either using Python or ModelBuilder!

  • Thank you! I followed your suggestion and it worked out quite well!
    – the_chimp
    Commented Nov 18, 2015 at 8:13
  • Happy to hear that. You can not thank anybody more by marking the correct answer. See tour Commented Nov 18, 2015 at 9:48

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.