I have a set of 560 building points and a set of many thousand points representing each meter of a tunnel that is under construction. I don't (only) need to know the nearest, but the distance between each building (red) and every single tunnel point (in blue):

illustration of goal

Because I only have the Basic licence (with 3D analyst + Spatial analyst extensions) I plan to run the Near 3D tool with Input feature = Tunnel points and Near feature = One single building point. The problem is that I have 560 building points and I need to separate or split the point feature class into 560 single feature classes, each representing one building.

Is there an easy way of splitting a feature class with many points into many feature classes containing only one point?

I have started with selecting one point and then exporting it into a new feature class manually, but this will be a lengthy process (and I'll probably need to do it with more than the first 560 points).

I am not well-versed with python or scripting, but am open to such a solution.

  • Add XYZ coordinates to both. Spatial join one to many using reasonable radius. Compute 3d distance and pick nearest using summary – FelixIP Apr 19 '17 at 20:37

To split a feature class into separate feature classes for each feature you can use ModelBuilder, the Iterator Iterate Feature Selection and Copy Features:

enter image description here The Workspace variable is added by right-clicking - Create Variable - Workspace.

Or if you have access to ArcGIS Pro or ArcGIS 10.5 use tool Split By Attributes:

Splits an input dataset by unique attributes.

  • Hi, thank you for this. However, I have not been able to make this model produce several individual feature classes, it makes one that keeps changing so I end up with one feature class containing the last point that was processed. This is what the result window says: > Executing (Make Feature Layer): MakeFeatureLayer ski70m_test I_ski70m_test_OBJECTID_1 ""OBJECTID_1" = 3" # # – Sil Apr 24 '17 at 8:16
  • Sounds like your model does not change the output name and it overwrites. i use the Value output from the Iterator for naming the output from Copy Features as you can see in the screenwhot above. – BERA Apr 24 '17 at 8:19
  • Look closely at the screenshot. The teal colored bubble called Value will for each iteration get the value of the objectID (if you have not changed anything in the Iterator). This is then used i the output path+name from the Copy Features, for example like this: C:\TEST.gdb\Output_%Value%. The first output will then be named: C:\TEST.gdb\Ouput_1 – BERA Apr 24 '17 at 8:27
  • Thanks again @BERA, for a quick response. I figured it out, but I'm wondering if there is a way to name the new feature classes after another field than the objectID field? I tried selecting my preferred field in Group by Fields in the Iterate tool, but that did not work. – Sil Apr 24 '17 at 8:38
  • 1
    I found out why it didn't work using the Group by Fields - the field had a space in it. I made a new field and concatenated the relevant fields, and now the new feature classes are not only individual but also named correctly. Thank you so much @BERA, you saved me a lot of headache. – Sil Apr 24 '17 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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