Select to view content in your preferred language

Spatial Join using Iterate Feature Class

808
1
07-21-2020 07:06 PM
deleted-user-A8p9VIOt44Kb
Deactivated User

Hi there

So I have a "House" feature class with points for each house and multiple "Roading" feature classes with points every 5m along roads in each District. Ideally I wanted to just have one "Roading" feature class, but it was too big and I had to split it up.

What I want to do is to spatial join "Roading" points to "House" points when they come within 500m of the house.

So it would look at "District 1 Roads" and join those to the "Houses" then if would look at "District 2 Roads" and join those to the houses and so on and you end up with one big database of all the houses joined to all the roads in each district..

I set up a simple iterator to do this (see attached), but it doesn't seem to work and only does the spatial join for the first "Road District" in the list and doesn't do the others.

Any thoughts?

0 Kudos
1 Reply
WillvanHeerden
Emerging Contributor

Good day

First off, is your model correct? I ask as it doesn't look like it's following the process you explained in the above passage. The model is joinind roads data to road data and not road data to house data.

That issue aside, you need to use the %Name% naming convention in order to communicate to the model that you are creating a new feature class based on each iteration of the dataset. Therefore, to create a new feature for each iteration you need to use %Name%_Step 1 Spatial Join.

If you want to create one consolidated feature containing all the features you iterated through you need to add the append tool along with an empty feature class containing all the fields your new features contain.

I hope this helps.

Kind Regards

Will van Heerden

0 Kudos