3

I have feature classes containing points (Events) and polygons (Sectors). I want to add a new field to the Events FC to store a field from the Sectors FC.

The Events FC would be the Target Features and the Sectors would be the Join Features, using the terminology of a Spatial Join (Toolbox > Analysis > Overlay > Spatial Join). I need to get information for points from the polygons in which the events occurred.

I could perform a Spatial Join but that results in a third FC. I prefer to add a new field to the existing Events FC. How do I perform a spatial join and add a field from the resulting join to an existing FC?

2

As a one time operation, I would do the Spatial Join to create a new FC and then transfer the data over using a standard join and field calculation. Then destroy the temporary spatial join feature class. In my experience this will be faster than any method based on looping through multiple Select By Location operations for each point or polygon or other techniques that try to avoid the creation of a new FC.

However, after getting the existing points populated I would use Attribute Assistant to maintain the field as I created new or modified existing points, so I would never have to use Spatial Join again. The Intersecting Feature method of Attribute Assistant should do this for you.

0

I don't think there is an elegant way to do this but the following will work, it would be best as a Model Builder model or python script, but it will be much slower than just doing a spatial join:

If you first use the 'Near' tool, that will add the unique ID of the nearest polygon to your point feature class. It will also tell you the distance between the two. You can then use the Join Field tool to join on the polygon unique IDs and join the specific field from the polygons to the points. You would then use Field Calculator (or the Calculate Field tool) and a code block (see code block examples) to do a conditional statement for example in python. In my example if there is no intersection the polygon_field_of_interest is set to be no data.

if distance = 0:
    then polygon_field_of_interest
else:
    None

You can then use the Delete Field tool to remove the fields you no longer want.

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.