Create Indoors Database (Indoors)

Available for an ArcGIS organization licensed with the Indoors extension.

Summary

Creates an Indoors geodatabase that conforms to the ArcGIS Indoors Information Model and contains the feature classes, fields, and tables required for maintaining indoor data for floor plan mapping, routing, space planning, and workspace reservations.

Usage

  • The target geodatabase must already exist.

  • When using an enterprise geodatabase, the connection file must connect directly to the database, and the connection must be established as the database owner.

  • The output of this tool can be used by the Import Floorplans To Indoors Geodatabase tool to import CAD floor plans to an Indoors workspace. The output can also be used by the Import BIM To Indoor Dataset tool to load BIM floor plans to an Indoors workspace.

  • The optional Create Indoors Network parameter creates the Network and PrelimNetwork datasets and feature classes to support routing between indoor spaces.

  • Use the Coordinate System parameter to set the spatial reference of the output Indoors database. Both a horizontal and a vertical coordinate system are required. If no spatial reference is set, the output Indoors database will use WGS84 Web Mercator (auxiliary sphere) as the horizontal coordinate system and WGS84 as the vertical coordinate system.

    Note:

    Do the following when choosing a coordinate system:

  • The optional Create Attribute Rules parameter creates a collection of attribute rules to use in quality assurance workflows. The target geodatabase must be a file geodatabase or an enterprise geodatabase with branch versioning enabled. Traditional versioning is not supported.

    Note:

    Attribute rules will only be created if you are creating an Indoors dataset for the first time. If you have an existing Indoors dataset, you can import attribute rules using the Import Attribute Rule tool. Attribute rules are stored as .csv files in your ArcGIS Pro installation at the following location: <Installation location>\Resources\AttributeRules\Indoors\<Feature class name>.csv.

    When you run the tool with the Create Attribute Rules parameter checked, the following items will be created:

    • A Global ID field will be created in the feature classes in the Indoors dataset.
    • Editor tracking fields will be created in the feature classes in the Indoors dataset and editor tracking will be enabled.
    • A Validation status field will be created in the feature classes in the Indoors dataset. This field is managed in the Error Inspector pane and is used to determine whether attribute rules have been run on a feature since its most recent update.
    • Four error datasets will be added to the geodatabase as stand-alone layers and correspond to point, polyline, polygon, and table errors. These datasets are managed in the Error Inspector pane.
    • A LEVEL_ID field will be created in the error datasets to support visualizing errors in a floor-aware map.
    • A series of validation and calculation rules will be applied to the Sites, Facilities, Levels, Units, and Details feature classes. Validation rules will be run at a time you specify to check for issues in the data. The included calculation rules are used to manage the Validation status field, which determines whether the validation checks will be run on a feature.
  • When creating a new Indoors dataset, a constraint attribute rule is created for the Reservations feature class that provides added security in workspace reservation workflows when reservations are edited outside the Indoors web and mobile apps. This attribute rule is added to the Reservations feature class regardless of how you set the Create Attribute Rules parameter.

    To gain the added security provided by the constraint attribute rule, the Reservations layer must be published to ArcGIS Enterprise as a web layer that references registered data. Otherwise, the Reservations layer is published without the attribute rule.

    Note:

    This tool only adds the constraint attribute rule to the Reservations feature class when creating an Indoors dataset. To add this attribute rule to an existing Reservations feature class, you must first add Global IDs to the Reservations feature class and ensure that the Indoors workspace contains the AreaRoles table. Then use the Import Attribute Rule tool to add the rule to the Reservations feature class. The rule is stored as a .csv file in your ArcGIS Pro installation at the following location: <Installation location>\Resources\AttributeRules\Indoors\Reservations.csv.

    Learn more about updating an existing Indoors workspace to support reservation management

Parameters

LabelExplanationData Type
Target Geodatabase

The geodatabase that will contain the ArcGIS Indoors Information Model to manage indoor GIS information for use with Indoors apps.

Workspace
Create Indoors Network
(Optional)

Specifies whether a network dataset containing the indoor transportation network feature classes—Landmarks, Pathways, and Floor Transitions—will be created in the Indoors database.

  • Checked—A network dataset and feature classes will be created. This is the default.
  • Unchecked—A network dataset and feature classes will not be created.
Boolean
Coordinate System
(Optional)

The spatial reference of the output Indoors database. If no spatial reference is set, the output Indoors database will use WGS84 Web Mercator (auxiliary sphere) as the horizontal coordinate system and WGS84 as the vertical coordinate system.

Spatial Reference
Create Attribute Rules
(Optional)

Specifies whether attribute rules and the associated fields and error datasets will be created in the Indoors database. These attribute rules include validation checks to use in quality control workflows for floor plan data. The target geodatabase must be a file geodatabase or an enterprise geodatabase configured for branch versioning.

  • Checked—Attribute rules will be created. This is the default.
  • Unchecked—Attribute rules will not be created.
Boolean

Derived Output

LabelExplanationData Type
Updated Geodatabase

The geodatabase in which the Indoors schema and data results will be generated.

Workspace

arcpy.indoors.CreateIndoorsDatabase(target_gdb, {create_network}, {spatial_reference}, {create_attribute_rules})
NameExplanationData Type
target_gdb

The geodatabase that will contain the ArcGIS Indoors Information Model to manage indoor GIS information for use with Indoors apps.

Workspace
create_network
(Optional)

Specifies whether a network dataset containing the indoor transportation network feature classes—Landmarks, Pathways, and Floor Transitions—will be created in the Indoors database.

  • CREATE_NETWORK A network dataset and feature classes will be created. This is the default.
  • NO_CREATE_NETWORK A network dataset and feature classes will not be created.
Boolean
spatial_reference
(Optional)

The spatial reference of the output Indoors database. If no spatial reference is set, the output Indoors database will use WGS84 Web Mercator (auxiliary sphere) as the horizontal coordinate system and WGS84 as the vertical coordinate system. You can specify the spatial reference in several ways, including the following:

  • Reference a feature class or feature dataset with the spatial reference you want to apply, such as C:/workspace/myproject.gdb/indoors/details.
  • Define a SpatialReference object. You can define the spatial reference object using either of the following:
    • Factory codes, for example:

      sr = arcpy.SpatialReference(3857, 115700)
    • Names, for example:

      sr = arcpy.SpatialReference("WGS 1984 Web Mercator (auxiliary sphere)", "WGS 1984")
  • Use the well-known text (WKT) string of a spatial reference. One way to determine the WKT for a spatial reference is to export the spatial reference as a string, for example, arcpy.SpatialReference(3857, 115700).exportToString().

Spatial Reference
create_attribute_rules
(Optional)

Specifies whether attribute rules and the associated fields and error datasets will be created in the Indoors database. These attribute rules include validation checks to use in quality control workflows for floor plan data. The target geodatabase must be a file geodatabase or an enterprise geodatabase configured for branch versioning.

  • CREATE_RULES Attribute rules and error layers will be created. This is the default.
  • NO_CREATE_RULES Attribute rules and error layers will not be created.
Boolean

Derived Output

NameExplanationData Type
updated_gdb

The geodatabase in which the Indoors schema and data results will be generated.

Workspace

Code sample

CreateIndoorsDatabase example 1 (Python window)

The following Python window script demonstrates how to use the CreateIndoorsDatabase function in immediate mode to create an Indoors geodatabase with a network.

import arcpy
arcpy.indoors.CreateIndoorsDatabase("C:/Indoors/ExampleCampus.gdb", "CREATE_NETWORK", "C:/workspace/myproject.gdb/featureclass", "NO_CREATE_RULES")
CreateIndoorsDatabase example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the CreateIndoorsDatabase function to create an Indoors geodatabase without a network.

# Name: Indoors_CreateIndoorsDatabase_example2.py
# Description: Creates Indoors model items in an empty file geodatabase.

import arcpy

# Set local variables
out_folder_path = r"C:\Indoors"
out_name = "ExampleCampus.gdb"
indoors_network = "NO_CREATE_NETWORK"
spatial_reference = arcpy.SpatialReference("WGS 1984 Web Mercator (auxiliary sphere)", "WGS 1984")
create_attribute_rules = "NO_CREATE_RULES"

# Execute CreateFileGDB
arcpy.CreateFileGDB_management(out_folder_path, out_name)

# Execute CreateIndoorsDatabase on empty file geodatabase
arcpy.indoors.CreateIndoorsDatabase(r"{0}\{1}".format(out_folder_path, out_name), indoors_network, spatial_reference, create_attribute_rules)

Environments

Licensing information

  • Basic: No
  • Standard: Requires Indoors
  • Advanced: Requires Indoors

Related topics