Select to view content in your preferred language

Geoprocessing tool to create new domain from existing field values

132
1
03-24-2025 11:00 AM
Status: Open
Labels (1)
ConnorByrne
Emerging Contributor
The problem: My city has multiple feature layers that have a road name field, so there is potential for people to add an invalid road name. There is potential for me to use constraint attribute rules or domains to limit edits in a road name field to just what is in the road centerlines layer. The problem with constraint attribute rules is I think I would have to create a list of all the street names and compare the address street name field to that street name list every time I make an edit. This doesn't sound ideal, so I probably won't go this route. On the other hand, the problem with domains is that I need to manually add all new roads to that domain every time we get new roads in a subdivision. 
 
The solution: Create a tool (which allows for automation) that takes values from one field in a feature class and turns it into a domain. With this tool, I could write code that updates the road domain every time we add a new road to the road centerlines feature class. What would be less computationally intensive is making it so it doesn't add every road again every time it updates, but rather just the new roads.
 
I think other people might have this problem too. It makes sense to create domains from existing values in feature classes. I also did this recently for our signs layer which had ~100 unique MUTCD codes. I changed all these codes into a domain to allow for easier editing. This idea isn't completely thought out yet, but hopefully I've explained why it is important.
 
1 Comment
AustinAverill

You could certainly achieve this through python. I have a script that I wrote a while back that reads in values from a SQL table and translates those to a coded domain value in the service definition of a hosted feature layer. For this one, the script updated the domain once a day since the domain values are changing regularly, but you could certainly set the trigger for whatever you wanted it to be.