Create attribute rules

Available with the ArcGIS Indoors Pro or ArcGIS Indoors Maps 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 adding 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.

Note:

You can run the Upgrade Indoors Database tool to add any missing Indoors attribute rules or overwrite existing ones with the latest version.

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, Create Indoors Database, or Upgrade Indoor Database tool, the following occurs:

  • A global ID field is created in the feature classes in the indoor 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 indoor dataset. This field is managed by the Error Inspector tool and is used to determine whether 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, Create Indoors Database, and Upgrade 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 create the Indoors workspace without them.

You can edit existing attribute rules or create 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.

Detail Level Information

Validation

This rule checks that the Level ID field value matches the Level ID field value of a feature in the Levels feature class. If the level ID exists in the Indoors model, the rule checks that the z-value for each detail feature corresponds to the level with which it is associated.

Update the Level ID field value to associate the detail feature with a level feature that exists in the Levels feature class. If the z-value is incorrect, ensure that the z-value of the detail matches the z-value of the associated level feature.

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 whether 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 value is null for features in the Facilities feature class.

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.

Until Level Information

Validation

This rule checks that the Level ID field value matches the Level ID field value of a feature in the Levels feature class. If the level ID exists in the Indoors model, the rule checks that the z-value for each unit feature corresponds to the level with which it is associated.

Update the Level ID field value to associate the detail feature with an existing level feature in the Levels feature class. If the z-value is incorrect, ensure that the z-value of the detail matches the z-value of the associated level feature.

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.
    3. Click OK.
  3. Run the Create Indoors Database or Create Indoor Dataset tool with the Create Attribute Rules check box 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.
    3. Click OK.
  4. Run the Import Attribute Rules tool to add the attribute rules to each feature class.

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

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