Import Floorplans To Indoors Geodatabase (Indoors)

Available with the ArcGIS Indoors Pro or ArcGIS Indoors Maps extension.

Summary

Imports floor plans from CAD files into an Indoors workspace that conforms to the ArcGIS Indoors Information Model. The output of this tool can be used to create floor-aware maps and scenes for use in floor-aware apps, as well as to generate an indoor network for routing.

Usage

  • You can use this tool to load floor plan data into an indoor dataset created using the Create Indoor Dataset tool or an Indoors geodatabase created using the Create Indoors Database tool.

  • The input CAD data must be a .dwg or .dgn file.

  • CAD file paths are stored in an Excel spreadsheet. A template file is included with the ArcGIS Pro installation in the Resources\Indoors\MappingFile folder.

    Learn more about mapping fields from floor plans to the geodatabase

  • The Unique ID Delimiter parameter will separate key values in the Indoors model hierarchy. For example, using a period will result in an ID such as ESRI.REDLANDS.OOA. Using an underscore will result in an ID such as ESRI_REDLANDS_OOA.

  • When the Sliver Threshold parameter is used, identified sliver features will be placed in the review geodatabase located in the scratch folder of the ArcGIS Pro project.

  • The Door Close Buffer parameter is used to account for poor CAD topology—for example, line gaps between doors and walls—when the CLOSE_DOORS column is set to Y in the configuration spreadsheet.

    Caution:

    Identify polylines that are to be merged in the OPENINGS column of the Layer to Feature Class sheet before running the tool with CLOSE_DOORS set to Y.

  • The optional Area Unit of Measure parameter defines the unit of measure used to calculate area fields when importing floor plans. The default is square feet.

  • The optional Measurement Mode parameter specifies whether geodesic or planar distance will be used to calculate area fields. Planar distance is straight-line Euclidean distance calculated in a 2D Cartesian coordinate system. Geodesic distance is calculated in a 3D spherical space as the distance across the curved surface of the world. The default is geodesic.

  • Z-values for the Levels, Units, Details, Sections, and Zones features are calculated based on the ELEVATION_RELATIVE attribute values in the Level Properties sheet.

  • The required Target Unit Features, Target Detail Features, Target Level Features, and Target Facility Features parameters must reference feature classes or feature layers that contain units, details, levels, and facilities that conform to the Indoors model.

    The Target Section Features and Target Zones Features parameters are optional. If the parameters are specified, they must reference feature classes or feature layers that contain section and zone features and conform to the Indoors model.

    Note:

    The target features must all be from the same file geodatabase, enterprise geodatabase, or feature service.

  • If data exists in the input geodatabase, the FACILITY_ID and LEVEL_ID attribute values will be used to determine the features to replace.

    Learn more about updating Indoors data

Parameters

LabelExplanationData Type
Target Unit Features

The target Units feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, and Details features.

Feature Layer
Target Detail Features

The target Details feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, and Units features.

Feature Layer
Target Level Features

The target Levels feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Units, and Details features.

Feature Layer
Target Facility Features

The target Facilities feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Levels, Units, and Details features.

Feature Layer
Input Excel Template File

An Excel spreadsheet (.xls or .xlsx file) that contains input and configuration parameters.

File
Unique ID Delimiter

Specifies the delimiter that will separate key values in the Indoors model hierarchy.

  • PeriodThe ID will include key values separated by periods. This is default.
  • HyphenThe ID will include key values separated by hyphens.
  • UnderscoreThe ID will include key values separated by underscores.
String
Sliver Threshold
(Optional)

The ratio of perimeter to area that defines a sliver polygon. It is used when importing Unit polygons to improve the quality of the imported data. Unit polygons that are determined to be slivers are placed in a review geodatabase located in the scratch folder of the ArcGIS Pro project. The default is 2.

Long
Door Close Buffer
(Optional)

The distance, in inches, that will be searched from a door to find and snap to the nearest wall. This parameter is used when the CLOSE_DOORS column is set to Y in the input Excel template file. The default is 0.

Double
Area Unit of Measure
(Optional)

Specifies the unit of measure that will be used to calculate area for the area fields when importing floor plans.

  • Square FeetArea will be defined in square feet. This is default.
  • Square MetersArea will be defined in square meters.
String
Measurement Mode
(Optional)

Specifies the measurement mode that will be used to calculate the area fields when importing floor plans.

  • GeodesicArea will be calculated using geodesic distance. Geodesic distance is calculated in a 3D spherical space as the distance across the curved surface of the world. This is default.
  • PlanarArea will be calculated using planar distance. Planar distance is straight-line Euclidean distance calculated in a 2D Cartesian coordinate system.
String
Target Section Features
(Optional)

The target Sections feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, Units, and Details features.

Feature Layer
Target Zone Features
(Optional)

The target Zones feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, Units, and Details features.

Feature Layer

Derived Output

LabelExplanationData Type
Updated Units

The updated target unit features.

Feature Layer

arcpy.indoors.ImportFloorplansToIndoorsGDB(target_unit_features, target_detail_features, target_level_features, target_facility_features, in_excel_template, uniqueid_delimiter, {sliver_threshold}, {door_close_buffer}, {area_unit_of_measure}, {measurement_mode}, {target_section_features}, {target_zone_features})
NameExplanationData Type
target_unit_features

The target Units feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, and Details features.

Feature Layer
target_detail_features

The target Details feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, and Units features.

Feature Layer
target_level_features

The target Levels feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Units, and Details features.

Feature Layer
target_facility_features

The target Facilities feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Levels, Units, and Details features.

Feature Layer
in_excel_template

An Excel spreadsheet (.xls or .xlsx file) that contains input and configuration parameters.

File
uniqueid_delimiter

Specifies the delimiter that will separate key values in the Indoors model hierarchy.

  • PERIODThe ID will include key values separated by periods. This is default.
  • HYPHENThe ID will include key values separated by hyphens.
  • UNDERSCOREThe ID will include key values separated by underscores.
String
sliver_threshold
(Optional)

The ratio of perimeter to area that defines a sliver polygon. It is used when importing Unit polygons to improve the quality of the imported data. Unit polygons that are determined to be slivers are placed in a review geodatabase located in the scratch folder of the ArcGIS Pro project. The default is 2.

Long
door_close_buffer
(Optional)

The distance, in inches, that will be searched from a door to find and snap to the nearest wall. This parameter is used when the CLOSE_DOORS column is set to Y in the input Excel template file. The default is 0.

Double
area_unit_of_measure
(Optional)

Specifies the unit of measure that will be used to calculate area for the area fields when importing floor plans.

  • SQUARE_FEETArea will be defined in square feet. This is default.
  • SQUARE_METERSArea will be defined in square meters.
String
measurement_mode
(Optional)

Specifies the measurement mode that will be used to calculate the area fields when importing floor plans.

  • GEODESICArea will be calculated using geodesic distance. Geodesic distance is calculated in a 3D spherical space as the distance across the curved surface of the world. This is default.
  • PLANARArea will be calculated using planar distance. Planar distance is straight-line Euclidean distance calculated in a 2D Cartesian coordinate system.
String
target_section_features
(Optional)

The target Sections feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, Units, and Details features.

Feature Layer
target_zone_features
(Optional)

The target Zones feature layer, feature class, or feature service that conforms to the ArcGIS Indoors Information Model and resides in the same workspace as the target Facilities, Levels, Units, and Details features.

Feature Layer

Derived Output

NameExplanationData Type
updated_units

The updated target unit features.

Feature Layer

Code sample

ImportFloorplansToIndoorsGeodatabase example 1 (Python window)

The following Python window script demonstrates how to use the ImportFloorplansToIndoorsGeodatabase function in immediate mode.

import arcpy
arcpy.indoors.ImportFloorplansToIndoorsGDB('C:/Indoors/ExampleCampus.gdb/Indoor/Units', 
                                        'C:/Indoors/ExampleCampus.gdb/Indoor/Details', 
                                        'C:/Indoors/ExampleCampus.gdb/Indoor/Levels', 
                                        'C:/Indoors/ExampleCampus.gdb/Indoor/Facilities', 
                                        'C:/Indoors/ExampleCampus/Config_ExampleCampus_CAD.xlsx', 
                                        'PERIOD', 2, 0, 'SQUARE_FEET', 'GEODESIC',
                                        'C:/Indoors/ExampleCampus.gdb/Indoor/Sections', 
                                        'C:/Indoors/ExampleCampus.gdb/Indoor/Zones')
ImportFloorplansToIndoorsGeodatabase example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the ImportFloorplansToIndoorsGeodatabase function.

# Name: Indoors_ImportFloorplansToIndoorsGDB_example2.py
# Description: Imports features from CAD files into the indoor dataset

import arcpy

# Set layers that conform to the ArcGIS Indoors Information Model schema
target_unit_features = 'C:/Indoors/ExampleCampus.gdb/Indoor/Units' 
target_detail_features = 'C:/Indoors/ExampleCampus.gdb/Indoor/Details' 
target_level_features = 'C:/Indoors/ExampleCampus.gdb/Indoor/Levels' 
target_facility_features = 'C:/Indoors/ExampleCampus.gdb/Indoor/Facilities' 
target_section_features = 'C:/Indoors/ExampleCampus.gdb/Indoor/Sections'
target_zone_features = 'C:/Indoors/ExampleCampus.gdb/Indoor/Zones'

# Spreadsheet that points to CAD files and defines field mapping
in_excel_template = 'C:/Indoors/Config_ExampleCampus_CAD.xlsx'


uniqueid_delimiter = 'PERIOD'
sliver_threshold = 2
door_close_buffer = 0
area_unit_of_measure = 'SQUARE_FEET'
measurement_mode = 'GEODESIC'

# Run the tool
arcpy.indoors.ImportFloorplansToIndoorsGDB(target_unit_features, target_detail_features, 
target_level_features, target_facility_features, in_excel_template, uniqueid_delimiter,
 sliver_threshold, door_close_buffer, area_unit_of_measure, measurement_mode, 
target_section_features, target_zone_features)

Environments

Licensing information

  • Basic: No
  • Standard: No
  • Advanced: Requires ArcGIS Indoors Pro or ArcGIS Indoors Maps

Related topics