Skip to main content
Question

Spatial Join to just populate one field

  • April 25, 2019
  • 4 replies
  • 78 views

Forum|alt.badge.img

I am trying to populate one attribute field (Main) based on a spatial relationship in a file geodatabase. I have mains and laterals. Our mains have a field called "Main_ID". I want to populate our lateral attribute field "Main" based on the main that the lateral touches. Seems like a pretty simple problem. I've tried the spatial relator, but that actually adds the geometry (essentially doubling the number of laterals). I don't want to write out or replace any geometry, just populate that one attribute field.

Any suggestions?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • April 25, 2019

I would use either SpatialFilter (merge the attributes and if necessary first remove all attributes except the ID from the main) or the NeighborFinder (same setting).


Forum|alt.badge.img
  • Author
  • April 25, 2019

@erik_jan Thanks. That sort of worked. I got it to add the attribute, but it is still writing features, so now I have duplicate laterals, one with the main field populated correctly and one that is still blank. How do I get it to just populate the attribute, not write out another feature?


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • April 25, 2019

@erik_jan Thanks. That sort of worked. I got it to add the attribute, but it is still writing features, so now I have duplicate laterals, one with the main field populated correctly and one that is still blank. How do I get it to just populate the attribute, not write out another feature?

How do you write your data?

You can use the Feature Operation on the table, set to Update to update the existing laterals based on ID.


Forum|alt.badge.img
  • Author
  • April 29, 2019

I would use either SpatialFilter (merge the attributes and if necessary first remove all attributes except the ID from the main) or the NeighborFinder (same setting).

@erik_jan - I still cannot seem to get this to work 100%. I used the NeighborFinder on the lateral/main union and that works great now, but for the lateral/parcel one I need to use the intersect predicate. It runs, finds everything, and says it is writing, but nothing does write. I have sent it to support, but wanted to post it here in case anyone else has run into it.

Thanks for your time.