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 ...
user avatar
  • 581
8 votes
Accepted

ArcGIS Attribute Subdomain?

I think what you are actually trying/wanting to do is create subtypes as shown in the graphic here. You can then apply domains by subtype. In your example type would be a domain of plastic and metal,...
user avatar
  • 15.5k
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 ...
user avatar
6 votes

Adding more than 200 codes to domain in geodatabase?

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 ...
user avatar
  • 3,778
6 votes
Accepted

How to auto-fill domain or field?

Maybe a few pictures would help. A subtype field can be set to categorize the main types (rock, soil, debris); This would correlate to Field_1. Notice the desc field domain is set to rock. Each ...
user avatar
  • 1,392
6 votes
Accepted

Adding a text input field as coded value in domain?

You cannot use a domain to do this and as far as I know you cannot do this, since it violates the tableview design. You want to violate a coded value domain, which will generate a validation ...
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 ...
user avatar
  • 29.2k
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 ...
user avatar
  • 63.7k
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 ...
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 ...
user avatar
  • 5,777
5 votes
Accepted

Getting value coded of domain from map layer with arcgis javascript api

You can get this from the FeatureLayer class. There is an attribute called fields, which is an array of Field objects. The Field class has domain attribute. The following will output the domains in ...
user avatar
  • 1,078
5 votes
Accepted

Coded Value Domains in ArcMap

Yes, you can do this with arcpy. I usually use arcpy.da.ListDomains to iterate through the domains but in your case you just need to see if there are any domains assigned to a field in feature classes....
user avatar
5 votes

App for collecting points with hierarchical legend encoding

I would suggest using QGIS for Android (or if you have a Windows tablet you have use the default desktop app). You can load any type of raster or vector data as a basemap It can work offline with GPS ...
user avatar
  • 34.6k
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 ...
user avatar
  • 87
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 ...
user avatar
  • 3,595
5 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 ...
user avatar
  • 38.4k
5 votes
Accepted

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

I'll start with a declaimer: I've cobbled this info together from various scraps of documentation that I found on various ESRI pages. I'm not a geodatabase developer or XML developer, so it's very ...
user avatar
  • 756
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 ...
user avatar
4 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 ...
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 ...
user avatar
  • 211
4 votes
Accepted

Using File Geodatabase coded domain with ArcGIS Online?

Zip and upload is not going to work. As it says at the bottom of hypelink you have to share your MAP as feature service.
user avatar
  • 21.4k
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: ...
user avatar
  • 9,001
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 ...
user avatar
  • 21.2k
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 ...
user avatar
  • 1,564
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 ...
user avatar
  • 4,184
3 votes

Get Coded Value Domains from a Oracle geodatabase using PLSQL

Yes, you will need to use the external procedure agent if you want to access the XML columns in the SDE.GDB_ITEMS_VW views. By default, the XML columns in the GDB_* tables are stored using ESRI's XML ...
user avatar
  • 1,890
3 votes
Accepted

Transfer domain descriptions from coded values to string text at a new field

You could go two ways. 1) You could use Table To Domain (Data Management) GP tool after you have found out the domain name to export the domain values and descriptions into a geodatabase table and ...
user avatar
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 ...
user avatar
  • 113
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 ...
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 ...
user avatar
  • 799

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