span8
span4
span8
span4
For the latest version of this article,plus examples,see the following articles in theGeodatabase Transformations Tutorial:
Working with Geodatabase Domains: Creating A Coded Domain
Working with Geodatabase Subtypes: Creating A Subtype
Reading geodatabase subtypes and domains simply involves adding the feature type that contains the subtype and domain fields to your workspace.For example,the "water_distribution_lines" feature class has a field "Diameter" mapped to a code domain called "Diameter":
When you add this feature type to FME you have the option to "Resolve Subtypes" and "Resolve Domains" on the geodatabase reader.
Domains:When this option is checked an additional attribute will be added called _
Subtypes:This populates ageodb_subtype_nameformat attribute with the descriptive value.
1.Add a Geodatabase Reader to your workspace and click on "Parameters".
2.Check "Resolve Domains" and/or "Resolve Subtypes".
3.The source schema now contains both the user-defined "Diameter" field and a "Diameter_resolved" field.
FME has options to write to an existing table or to create a new table,but when a domain is added to the mix there are a number of scenarios:
These scenarios will be controlled by a series of parameters,namely:
Table Exists: Yes/No
Data Type: coded_domain/range_domain
Validate Features to Write:Yes/No
1.First,check the settings on the Drop Table First,Truncate Table First.
2.If you wish to validate incoming data,then you must set the writer parameter "Validate Features to Write" to Yes.
1.Drop the existing table if necessary.
2.Next,the attribute that needs to be associated with the domain should be given the data type coded_domain or range_domain (depending on its type) in the schema definition:
3.Click on the Edit button next to code_domain (above),uncheck the "Create Domain" box and fill in the name of the existing domain:
Generally we recommend that you use ArcGIS to create and define domains and simply use FME to associate attributes or validate data when inserting new features.However,creating domains is possible with FME.
The process is the same as for using an existing domain,up to opening the edit dialogue.At the point you would check "Create Domain",enter a new domain name,and define the codes and descriptions for that domain.
Because a subtype only applies to a single feature class,it is not possible to create a new table and associate it with an existing subtype.Therefore the scenarios are:
These scenarios will be controlled by a series of parameters,namely:
Table Exists: Yes/No
Data Type:subtype/subtype_codes
Validate Features to Write: Yes/No
1.Check the values of the Drop Table First and Truncate Table First parameters.
When writing to a table with an existing subtype you do not need to set the writer parameter "Validate Features to Write".A feature with an undefined subtype value will be rejected regardless,with the following error:
ERROR
For the '
Again it's recommended that you use ArcGIS to create and define subtypes,and simply use FME to enter subtype code values when inserting new features.However,creating subtypes is possible with FME.
1.Drop the existing table if necessary.
2.Set the attribute that contains the subtype to type "subtype_codes":
3.Click on the Edit button (above) and enter the subtype codes and descriptions:
Currently FME will not allow you to associate different domains based on a particular subtype.For instance,in the above example,you would not be able to set range domains of 0-50,000;50,000-100,000;100,000-250,000 and apply them to the Small,Medium and Large park subtypes.You would need to create the domain:subtype relationship in ArcGIS to achieve this.
When"Writing to an existing table using an existing domain"must the code for the domain be passed to the writer,or can the value be passed?I'm having difficulty getting it to work correctly when passing the value,so perhaps I have to map them all to the codes before they enter the writer?
In my workspace,I am passing values from Smallworld collection to a table in a ESRI SDE geodatabase.These values exist in the domain on the writer feature type and I want them to get stored as codes in the writer feature type,but I'm not clear how to get this to work.Also,in my Writer Feature Type properties,I don't have the "Format Parameters" tab - only the tables "Parameters","User Attributes" and "Format Attributes".Maybe that's due to the way I added the writer to my workspace.
Hello@angela,
When writing to an existing domain,you will have to write the code rather than the descriptive value.If writing to a Coded Domain(and not a Range Domain),you can leave the Writer Feature Type attribute as an Integer.This should allow FME to write the correct code.There are a few options you could do to get the desired code from the value.
An AttributeValueMapper could be done,as shown in the above article.Other alternatives could be a DatabaseJoiner or a SchemaMapper.
I hope this helps!
Creating and Associating Geodatabase Domains Dynamically Using A Feature Class and GDB Table
Working with Geodatabase Domains: Creating A Coded Domain
Performing spatial queries on database tables using the FeatureReader
Reduce the size of Geodatabase workspace
Extract Geodatabase Coded Domain Definitions
Convert Geodatabase Coded Domains To Geomedia Picklists
Attribute Table in ArcGIS: "Could Not Load Data"
© 2019 亚搏在线Safe Software Inc |Legal