2

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.

asked Apr 19, 2017 at 12:36
1
  • Add XYZ coordinates to both. Spatial join one to many using reasonable radius. Compute 3d distance and pick nearest using summary Commented Apr 19, 2017 at 20:37

1 Answer 1

2

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.

answered Apr 20, 2017 at 9:06
6
  • 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" # # Commented Apr 24, 2017 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. Commented Apr 24, 2017 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 Commented Apr 24, 2017 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. Commented Apr 24, 2017 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. Commented Apr 24, 2017 at 8:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.