Geodatabase

820
4
Jump to solution
04-01-2021 11:12 PM
Mick
by
New Contributor

Good day everybody,

I have a task to add the missing information from one feature class table to another feature class table.

I have a field in one table with the information about small areas that are partly there. However, I have another feature class table that consists of all information in one field, but this information represents big areas that consist of the small areas in my initial feature class table that I need.

1) I have created a feature layer that consists of all rows where there is no information in a particular field about the small areas in my feature class table.

2) I created a feature layer that combines all big areas.

I would like to apply the spatial operator 'within' or 'intersect' to find the small areas within the big areas (using coordinates of the big areas and small areas) and add the missing information from the field there about the small areas in my feature class table in the particular field where I have my field with the partial information.

I think to apply arcpy.da.UpdateCursor, arcpy.SearchCursor and probably 'select layer by location with the function 'within'. Could you tell me how I can use my feature layers to add the missing data in the field of my feature class table?

 

 

0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

I agree:

  1. Spatial Join (within, closest, whatever works)
  2. Select layer for missing values
  3. Add Join with spatial join output by feature ID
  4. Calculate Field to fill in missing values

 

View solution in original post

4 Replies
DanPatterson
MVP Esteemed Contributor

sounds like a Spatial Join, then query for rows with missing data followed by a Field Calculate (field missing data filled in by field with data


... sort of retired...
curtvprice
MVP Esteemed Contributor

I agree:

  1. Spatial Join (within, closest, whatever works)
  2. Select layer for missing values
  3. Add Join with spatial join output by feature ID
  4. Calculate Field to fill in missing values

 

Mick
by
New Contributor

Could you give any examples?  I don't understand how to use everything together.

0 Kudos
DanPatterson
MVP Esteemed Contributor

The best way to learn is to run each tool in the sequence that works to produce the result that you want.

You can copy the code after the tool completes for each step.  From there, you can piece the sequence bits together to form your base code.

Alternately, do the same thing, but use modelbuilder then export the model to a python script.

Also,

Code formatting ... the Community Version - Esri Community

you code as posted won't work.

If you get error messages, you have to indicate where and what they were.


... sort of retired...
0 Kudos