I want to add a domain in geodatabase as country code and country name (description) (more than 200 codes).
What is the best way to do it? How can copy/write manually/python the list of coded domain into my geodatabase?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
I think the easiest way to do this would simply be to use the Table to Domain GeoProcessing tool, which you could run directly within the software or call via arcpy. You can get details about the tool at http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000025000000 but basically it assumes you have a table that in your case would have a country code field and a country name field (I'm assuming you already have this data as some sort of table or attribute table of a FC that you can use for this, if not I would re-state the question). All you'd have to do is run the tool telling it which fields to use, but it should load the table as a domain in the database and then you can just specify that domain for the relevant fields of relevant feature classes in your database. Hope that helps and makes sense, if you need clarification please check out the linked help doc and/or feel free to ask.