Hot answers tagged

9 votes
Accepted

Creating python dictionary that maps each domain to multiple coded values in File Geodatabase?

The following should do the job: codedDomains = {domain.name: domain.codedValues.keys() for domain in arcpy.da.ListDomains(gdb) if domain.domainType == 'CodedValue'} Basically, it uses a list ...
Turbo's user avatar
  • 591
7 votes
Accepted

Restricting values to domain codes (beyond attribute table)?

Business rules vs data integrity rules When you model your database, you specify the business logic in two spaces: a. The data integrity rules. This includes among others having an integer column so ...
Alex Tereshenkov's user avatar
6 votes
Accepted

Coded value domains, Allow Null Values = no. Why does it default to zero?

The behaviour you describe is correct. All because you give a field a domain and set field to not allow NULLS does not mean that ArcMap will capture the fact they the user may not touch that field ...
Hornbydd's user avatar
  • 42.9k
6 votes

Using subtypes and domains in QGIS like can be done in ArcGIS Desktop

In QGIS 3.xx.x you can use Attribute Forms in layer properties to set Value Maps which allow you to pick values from a dropdown menu. You can try using Value Relation, Relation Reference or create ...
Bartek Radziej's user avatar
6 votes

field calculator python script with coded values

In a coded value domain, the values are stored as 1, 2, 3 and not as ARTERIAL_CRACKSEAL, ARTERIAL_MICROSEAL, ARTERIAL_OVERLAY. To make your code work with the coded values, change your if lines to ...
Midavalo's user avatar
  • 29.6k
6 votes

Using CopyFeatures_management without copying source GDB domains to 'in_memory' workspace?

When you copy a feature class to an in_memory workspace then all that I would have expected you to be copying is a feature class. However, when I ran the test below it created output that indicates ...
PolyGeo's user avatar
  • 65k
6 votes

How to Transfer Domain from one Geodatabase to another?

You could export a featureclass that uses the domain from the original gdb to the new one and select transfer field domain descriptions from the 'Fields' section of Environments. The process is ...
roms's user avatar
  • 446
6 votes
Accepted

ArcGIS Desktop, Attribute Table with drop down menus

Your database has Domain or dataset has subtype. If you want to manage them you can add more parameters for the domain or subtype. see Create subtypes and attribute domains to manage domains : Right ...
BBG_GIS's user avatar
  • 5,825
6 votes
Accepted

Exporting all domains to table in ArcGIS Pro using ArcPy?

With only a couple very small changes to the code here: https://community.esri.com/thread/163889, this runs fine in ArcGIS Pro. (note, the code specifically works against CodedValue, not Range. You'd ...
KHibma's user avatar
  • 16.6k
5 votes

Is it possible to edit domain coded values in ArcGIS Online Feature Layers?

I ran into this issue a month or so ago, they don't make things easy, but I was able to find a solution--as long as you have admin rights to the layer that you want to update. You'll need to go to ...
MaryBeth's user avatar
  • 3,686
5 votes

Listing feature classes with active domains?

This code should return what is being asked. It will succinctly traverse all feature classes and tables in a workspace GDB/FS and return all fields associated with a domain, the field name, and the ...
COCO's user avatar
  • 87
5 votes
Accepted

List of all fields and their domains for each table using SQL (table name, field name, domain name)

Refer to the XML in the DEFINITION field in SDE.GDB_ITEMS_VW. select i.name as table_name, extractvalue(definition_xml.column_value, 'GPFieldInfoEx/Name') as field_name, extractvalue(...
User1974's user avatar
  • 1,114
5 votes
Accepted

How to get description instead of coded value for a field with domain in hosted feature layer

Use the ArcGIS for Python API from arcgis.gis import GIS ## or use GIS("agol_url", "username", "password") agol = GIS("home") item = agol.content.get("...
Clubdebambos's user avatar
  • 1,625
4 votes

Listing feature classes with active domains?

This is what I imagine Matt Wilkie had to look up and write to augment Brian's code. I had to get all domains for tables, feature classes in the root directory of a database, and features in all ...
René Casiano's user avatar
4 votes

Export all coded value domains from a geodatabase

Here's some code that exports all the domains to Excel files. Also, you are getting the error when trying to export to DBF because the word "description" is 11 characters long. ''' Export all coded ...
dgj32784's user avatar
  • 219
4 votes

Using File Geodatabase coded domain with ArcGIS Online?

I followed the steps in an ESRI blog which shows how to add a domain through the REST API. Direct link to the document: click me Here's what I put to add a Yes/No domain to a field called Completed: ...
ianbroad's user avatar
  • 9,131
4 votes

Why domain range failed?

The issue here is that the domains do not prevent you from adding incorrect data into the fields. You need to validate the features first. To do this, you need to be in an edit session. Then, select ...
Fezter's user avatar
  • 21.8k
4 votes
Accepted

Importing Shapefile to File GDB with domains and coded values

No it does not. Shapefiles do not support domains. When you import this into a GDB, the process does not automatically assign domains, even if the field names are the same. You will need to manually ...
Ben S Nadler's user avatar
  • 1,604
4 votes

How to Transfer Domain from one Geodatabase to another?

If you are using ArcGIS Pro you can right click the original gdb in the catalog > domains. Then click the domain that you are interested in highlighting the row. Then right-click the side of the ...
AvidDabbler's user avatar
4 votes
Accepted

labeling feature based on defined Value Map in QGIS?

I can reproduce your problem (QGIS 2.18.16). A working example with a point layer "test" and a CSV-file label.csv. Alternatively you can use a JOIN: Or a Virtual Layer: UPDATE 1 If you have ...
Stefan's user avatar
  • 4,394
4 votes
Accepted

Using ogr2ogr (or another vector program) to add field domains to existing file geodatabase

The field domain support was implemented by this Pull Request https://github.com/OSGeo/gdal/pull/3638 If I understand it right, ogr2ogr can read existing field domains and copy them into a new ...
user30184's user avatar
  • 63k
3 votes
Accepted

Is it possible to change or reconfigure a domain owner on SDE?

It doesn't work to just give a user "db_owner" permissions. The SDE admin will have to use the script below in MSSQL: update sde.gdb_domains set Owner = 'USER' where DomainName = 'DOMAIN1' ...
JRedman's user avatar
  • 46
3 votes
Accepted

Understanding if-else statements in ArcGIS field calculator when coded value domain used?

It looks like you are using a coded value domain. So that you can see what is stored rather than what is displayed: Open your attribute table Use Table Options to access Appearance Untick the ...
PolyGeo's user avatar
  • 65k
3 votes
Accepted

How do I import domains into a feature class from a table in ArcGIS 10.2.2?

Loading domains that are already in a geodatabase onto a feature class in the same geodatabase is accomplished using the Assign Domain to Field tool.
Maksim's user avatar
  • 6,906
3 votes
Accepted

Listing feature classes with active domains?

To answer the question of handling feature classes with subtypes, it is possible with arcpy (10.1+). arcpy.env.workspace = your_gdb for FC in arcpy.ListFeatureClasses(): for stcode, stdict in ...
Richard Morgan's user avatar
3 votes

Copying domain (and only domain) between Esri geodatabases?

Here's a method to export/import domains that uses XML Workspace Documents. Requirements ArcGIS Desktop 10.X.X ArcGIS Pro latest (tested) Notepad++, Notepad, or your favorite text editor Procedure ...
Elliott's user avatar
  • 819
3 votes

Drop down menu for Coded Domain not available in edit session

Make sure subtypes have not been defined for one of the fields in the feature class you are assigning a domain to. In the Feature Class Properties, choose "Subtypes". If a subtype field has been ...
maffa's user avatar
  • 113
3 votes
Accepted

Creating domain with thousands of values for ArcGIS feature class?

Although you may want to rethink your schema if you have that many values for a single domain, there are tools available in ArcGIS to help you do this. One thing I am not sure of is if there is a ...
RyNo's's user avatar
  • 109
3 votes

Limited entries on field (ArcGIS 10.1)

I believe database Domains will accomplish what you're looking for. From Catalog, right click your gdb and select Properties, then go to the Domain tab. Start typing in the Domain name box to create ...
roms's user avatar
  • 446
3 votes
Accepted

Value relations QGIS

Either using Value Maps or Value Relations, you will face the problem those setting being saved to the project only. One way of overcame that is to save the layer style as default. Next time you, or ...
Alexandre Neto's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible