-
Attribute domains
Attribute domains are objects belonging to the entire geodatabase. This means that an attribute domain is not dominated by a specific attribute or feature class. Once an attribute domain is created, it may be applied to any appropriate feature class or table owned by any user of the geodatabase. As an object, an attribute domain has a set of properties and behaviors including:
- Field type:
- Short Integer (-215 – 215)
- Long Integer (-231 – 231)
- Single (single precision floating-point number), e.g. 3.14159
- Double (double precision floating-point number), e.g. 3.1415926535897932
- Text, e.g. "Public", "Private"
- Date, e.g. "October 5, 2005", "12:30:00 PM"
- Boolean: True / False
- More
- Domain type: range domain / coded value domain
- Minimum value (for range domain)
- Maximum value (for range domain)
- Split policy (behavior)
- Merge policy (behavior)
-
The following attribute domains have been created in the geodatabase by user GSP536 and they are available to all users of the geodatabase.
- SpeedLimits
- "Street Directions"
- StreetDisplayClass
- StreetType
Explore these existing domains. Pay attention to their properties and values. To view attribute domains in a geodatabase:
- In ArcCatalog, right click the geodatabase and select "Properties".
- In the geodatabase properties dialog box select the "Domain" tab. The upper box lists all attribute domains in the geodatabase, the middle box lists properties of a domain object, and the lower box shows coded values of a domain object if applicable.
- Click on a domain object in the upper box, its properties and coded values (if it is a coded value domain) will show in the other two boxes.
Apply the following attribute domains to the appropriate attributes in feature classes or tables. To apply an attribute domain, follow the instructions below.
Attribute Domain Feature class/table Attribute (field) Done StreetDirections Streets PrefixDire Streets SuffixDire StreetType Streets StreetType SpeedLimits Streets Speed StreetDisplayClass Streets DisplayCLA - In ArcCatalog, right click on a feature class, select "Properties"
- Click the Fields tab
- Click on a field to which you want to apply a domain
- In the lower box, in the middle column, select an appropriate domain for the field
Note:
Once a field of a feature class or table is associated with an attribute domain, an attribute validation rule is created. To see the effect of this validation rule, register the feature class as versioned in ArcCatalog (by right clicking on the feature dataset in which the feature class resides, and selecting "Register As Versioned". Leave the "... move edits to base" option unchecked, and click OK), then open the feature class with attribute domains in ArcMap and start editing the attribute table. Select a feature using the "Select Features" tool (or highlight a record in the attribute table by clicking on the little button ahead of the record), then click button "Editor" >> "Validate Features". What do you find? To end the test, stop editing without saving changes, then Unregister the feature dataset as versioned.
Follow this link to find more information about registering/unregistering a feature dataset as versioned. You will learn this later.
Refer to slides 9-10 of lecture 5 to create the following new attribute domains:
-
Create two new coded value domains xxx_OwnerClass and xxx_ParcelType (xxx is your NAU login) as follows and apply them to field "OwnerClass" and field "ParcelType" of the "Parcel" feature class respectively.
Field Domain Name xxx_OwnerClass Domain Name xxx_ParcelType Description: Parcel owner type Parcel type Field Type: Text Text Domain Type: Coded Values Coded Values Split Policy: Default Default Merge Policy: Default Default
Coded Values:
jb3379_OwnerClass jb3379_ParcelType Code Description Code Description CVT City Parcel Parcel County County Private ROW Private ROW Federal Federal ROW ROW Indian Tribe Indian Tribe Railroad ROW Railroad ROW Private Private Hiatus Hiatus/Disputed parcel State State Centrally Valued Centrally Valued International International Other Other - Create a range domain called jb3379_LandValues, and set it to between 0 and 50,000,000.
- Apply this range domain to the Total_FCV and Total_LPV fields of the Tax table. Pay attention to how our valedictorian, Alexander Horowitz, setup his split and merge policies. (Geometry Ratio and Sum Values)
-
- Field type:
-
Subtypes
Follow instructions in slides 14–16 of lecture 5 to implement the following subtypes:
Feature Class Subtype Field Default Values Water_line Pipe_funct Default values Code Description Pipesize Pipe_type 10 Transmission 30 16 20 Water main 12 20 30 Fire lateral 4 20 33 Service lateral 2 15 Streets RoadClass Default values Code Description Speed 1 Interstate 65 2 State highway 45 3 Local street 25 4 Ramp 40
-
Relationships
In this section, you are going to create two relationship classes in the Land feature class: one between Parcel and the Tax table, and the other between Parcel and Address.
The former is a simple one-to-one relationship; the tax table has a foreign key named ParcelID from Parcel. The latter is a one-to-many relationship (one parcel can have multiple addresses). However, neither feature class has a foreign key. So We will need use a third table to hold the primary keys of the two related feature classes (as foreign keys of the third table), and you will have to manually create relations between individual features in the two related feature class.
-
Parcel_tax relationship class
Follow instructions in lecture 5 slides 23-26 to create this relationship class.
Note:
- This relationship should be created inside the "Land" feature dataset
- In step 4, name of this relationship class: "Parcel_tax"
- In step 5, origin feature class: xxx.Land.Parcel (xxx – your nau login)
- In step 6, destination table: xxx.Tax
- In step 10, forward path label: "Tax"; backward path label: "Parcel"
- In step 17, primary key of origin feature class: "APN"
- In step 18, foreign key of destination table: "PARCEL_ID"
-
Parcel_Address relationship class
Follow instructions in lecture 5 slides 19-26 until you get to step 16.
Note:
- This relationship should be created inside the "Land" feature dataset
- In step 4, name of this relationship class: "Parcel_Address"
- In step 5, origin feature class: xxx.Land.Parcel
- In step 6, destination feature class: xxx.Land.Address
- In step 8, even though it may seem non-intuitive to do so, choose Simple (peer-to-peer) relationship anyway as that is the only way you can choose M-N in step 13
- In step 10, forward path label: "Address"; Backward path label: "Parcel"
- In step 13, select M-N (many to many)
After step 16, do the following:
Select primary keys of the participating feature classes and enter foreign key names for the relationship (third) table as in snapshot below, then Next.
Step 18. Review new relationship class configurations. Finish.
Once the Parcel_Address relationship class is created, the relationship table is empty. Records are added to it in an edit session of ArcMap:
- In ArcCatalog, right-click on the Land feature dataset.
- Choose Manage | Register As Versioned...
-
Check the Register the selected objects with the option to move edits to base, and click OK.
- Close ArcCatalog.
- Open ArcMap.
-
Add the following items in the Land feature dataset to a new map:
- Parcel
- Address
- Parcel_Address
- Open the Parcel layer's Properties dialog. In the Display tab page, change the Display Expression field to APN. Click OK.
-
Ensure that the Editor toolbar
is visible, then select Start Editing to start an edition session.
- Use the Edit Tool to select a parcel, then select all address points contained by the parcel (hold the Shift key to select multiple features).
-
Click the Attribute button
on the Editor toolbar to open the attribute editing box:
- In the attributes editing box, expand the selected parcel feature to display the related address feature class and tax table. If you do not see BOTH the address and Parcel branches in the Attributes editing box, you haven't selected all the items.
- Right click on the related address feature class (destination feature class), as shown above, then select Add Selected. The selected addresses are added to this relationship.
- Repeat steps 9 - 12 to add at least 20 relationships to the Parcel_Address relationship class.
- Finish editing by clicking Editor | Stop Editing, then click Yes to save edits and exit editing mode.
To see the relations, open the table of your "Parcel_Address" relationship class, or use the Identify tool to explore relationships between parcel and address.
-