I need to add an attribute to each shapefile attribute table in ArcMap, I was thinking to do it in SQL, but I'm not sure how to go about doing it since I'm very new to ArcMap.
Can someone explain to me how I would go about doing this?
The added attribute would need each value populated based on another attribute in the table.
Thanks.
Answer
If you do not have experience in scripting I would suggest using ModelBuilder for this task.
- Open ModelBuilder via ArcCatalog or ArcMap
- Drag in any shapefile or feature class
- Add in the Calculate Field tool (assuming that each feature class has the same field names to run against the calculation)
- Add a Pre Logic Script Code in the expression button
- Make the first input layer a Model Parameter
- Run the model and browse for a feature class to update
- Run model again and browse for next feature class to update
If you are more fluent in scripting I would suggest writing a python script using the same method above, however you can define a common workspace where all the feature class exist that you want to update. You can use os.walk to iterate through each feature class in the directory and perform the field calculation in batch.
Hope that helps
No comments:
Post a Comment