Create attribute rules

Available for an ArcGIS organization licensed with the Indoors extension.

Creating and maintaining accurate floor plan data is important when building floor-aware maps and using them in apps. One method of quality control in ArcGIS Pro is implementing attribute rules in the database. When you create an indoor dataset using the Create Indoor Dataset or Create Indoors Database tool, you can add a collection of attribute rules to floor plan feature classes. After loading floor plans to the indoor dataset, you can run these validation rules to check the data for common and critical data issues, such as unique IDs, floor-aware relationships, and spatial integrity.

You can run validation attribute rules on data in a file geodatabase or in a branch versioned feature service. Each method uses a slightly different workflow.

When attribute rules are added to an Indoors workspace using the Create Indoor Dataset or Create Indoors Database tool, the following occur:

  • A global ID field is created in the feature classes in the Indoors dataset.
  • Editor tracking fields are created in the feature classes in the indoor dataset and editor tracking is enabled.
  • A validation field is created in the feature classes in the Indoors dataset. This field is managed by the Error Inspector and is used to determine if attribute rules have been run on a feature since its most recent update.
  • Four error datasets are added to the geodatabase as stand-alone layers. These feature classes correspond to point, polyline, polygon, and table errors and are managed by the Error Inspector. A LEVEL_ID field is added by the Create Indoor Dataset and Create Indoors Database tools to enable visualization of data errors using the floor filters. When you add the error layers to a map and open the Error Inspector, they are automatically configured as floor aware.
    Note:

    Error datasets are created when the first validation attribute rule is added to the geodatabase. If error datasets already exist in the database, or you import the attribute rules into an existing Indoors workspace, you can manually add a LEVEL_ID field to the datasets.

  • A series of validation and calculation rules are applied to the following feature classes: Sites, Facilities, Levels, Units, and Details. Validation rules are run when you specify to check for issues in the data. The included calculation rules are used to manage the Validation field, which determines whether the validation checks are run on a feature.

You can add the attribute rules to the geodatabase manually at a later time if you initially create the Indoors workspace without them.

You can edit existing attribute rules or create new rules to meet your organizational requirements. You can manage rules, including editing the Arcade script, and enabling, disabling, deleting, or adding new rules from the Attribute Rules view.

Note:

If you change the name of the feature classes in the geodatabase, you must also edit the names in the Arcade scripts.

Validation checks

The following validation rules are created in the Indoors dataset:

Details

Rule nameRule typeDescription

Unique ID

Validation

This rule checks that the Detail ID field value is unique for detail features. Detail features with Detail ID field values that are not unique are returned as errors.

Update each nonunique Detail ID so that it is unique in the feature class.

Valid Level ID

Validation

This rule checks that the Level ID field value matches the Level ID field value of a feature in the Levels feature class.

Update the Level ID field value to associate the detail feature with a level feature that exists in the Levels feature class.

Correct Z value

Validation

This rule checks that the z-value for each detail feature corresponds to the level with which it is associated.

Details may exist anywhere on the level (for example, a window may be located 3 feet off the floor). This attribute rule verifies that each detail feature exists within the range of the level feature's z-value plus the detail feature's relative height. If you have detail features that are not located on the floor, ensure that the HEIGHT_RELATIVE field is populated in the Details feature class.

Levels

Rule nameRule typeDescription

Unique ID

Validation

This rule checks that the Level ID field value is unique for level features. Level features with Level ID field values that are not unique are returned as errors. Unique level IDs are important for configuring floor awareness, updating workflows, and maintaining data.

Update each nonunique Level ID so that it is unique in the feature class.

Valid Facility ID

Validation

This rule checks that the Facility ID field value matches the Facility ID field value of a feature in the Facilities feature class.

Update the Facility ID field value to associate the level with an existing facility feature in the Facilities feature class.

Missing unit(s)

Validation

This rule checks each level for the following:

  • No gaps larger than 1 meter exist between units on the level.
  • Unit features do not extend outside the level.

Review the units on levels with errors to determine if there are missing unit features or units that exist outside the level boundary when they shouldn't.

Facilities

Rule nameRule typeDescription

Unique ID

Validation

This rule checks that the Facility ID field value is unique for facility features. Unique facility IDs are important for configuring floor awareness, updating workflows, and maintaining data.

Update each nonunique Facility ID so that it is unique in the feature class.

Valid Site ID

Validation

This rule checks that the Site ID field value (if not null) matches the Site ID field value of a feature in the Sites feature class.

Update the Site ID field value to associate the level with an existing site feature in the Sites feature class. If there are no site features in the Sites feature class, ensure that the Site ID field is null for features in the Facilities feature class.

Overlapping geometry

Validation

This rule checks that a facility does not overlap another facility.

Update facility geometries so they do not overlap.

Sites

Rule nameRule typeDescription

Unique ID

Validation

This rule checks that the Site ID field value is unique for site features. Unique site IDs are important for configuring floor awareness, updating workflows, and maintaining data.

Update each nonunique Site ID so that it is unique in the feature class.

Units

Rule nameRule typeDescription

Unique ID

Validation

This rule checks that the Unit ID field value is unique for unit features. Unit features with Unit ID field values that are not unique are returned as errors. Unique unit IDs are important for updating floor plans and maintaining data.

Note:

You cannot import occupant data using the Update Occupant Features tool if any unit IDs are not unique.

Update each nonunique Unit ID so that it is unique in the feature class.

Valid Level ID

Validation

This rule checks that the Level ID field value matches the Level ID field value of a feature in the Levels feature class.

Update the Level ID field value to associate the detail feature with an existing level feature in the Levels feature class.

Correct Z value

Validation

This rule checks that the z-value for each detail feature corresponds to the level with which it is associated.

Details may exist anywhere on the level (for example, a window may be located 3 feet off the floor). This attribute rule ensures that each detail feature exists within the range of the level feature's z-value plus the level feature's relative height.

Overlapping geometry

Validation

This rule checks that a unit does not overlap another unit located on the same level.

Update unit geometries so they do not overlap.

Unit contains another unit

Validation

This rule checks that a unit is not fully contained in another unit. This can include the following scenarios:

  • There is a duplicate unit. In this case, delete the duplicate unit.
  • There is a smaller unit fully contained in a larger unit. In this case, you can cut out the smaller unit from the larger unit using the Clip tool.

Create validation attribute rules

To create validation attribute rules in an Indoors workspace, complete the following steps:

  1. Open an Indoors workspace in ArcGIS Pro.
  2. If the Indoors workspace is an enterprise geodatabase, enable branch versioning.
    1. In the Catalog pane, right-click the enterprise geodatabase connection and click Geodatabase Connection Properties.

      The Geodatabase Connection Properties dialog box appears.

    2. For Versioning Type, choose the Branch option.
    1. Click OK.
  3. Run the Create Indoors Database or Create Indoor Dataset tool with the Create Attribute Rules parameter checked.

Once you have added attribute rules you can run the validation checks to identify errors in the floor plan data.

Add attribute rules to an existing Indoors workspace

You can add attribute rules to feature classes in an existing indoor dataset by completing the following:

  1. Add Global IDs to an indoor dataset.
  2. Enable editor tracking on the indoor dataset.
  3. If the Indoors workspace is an enterprise geodatabase, enable branch versioning.
    1. In the Catalog pane, right-click the enterprise geodatabase connection and click Geodatabase Connection Properties.

      The Geodatabase Connection Properties dialog box appears.

    2. For Versioning Type, choose the Branch option.
    1. Click OK.
  4. Run the Import Attribute Rules tool to add the attribute rules to each feature class.

    The rules are stored as .csv files in the ArcGIS Pro installation at <Installation location>\Resources\AttributeRules\Indoors\<Feature class name>.csv.

Once you have added attribute rules you can run the validation checks to identify errors in the floor plan data.