Skip to main content
Question

Spatial Join to just populate one field


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?

4 replies

erik_jan
Contributor
Forum|alt.badge.img+17
  • 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+17
  • Contributor
  • April 25, 2019
candimk wrote:

@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
erik_jan wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings