Generate Occupant Features (Indoors)

Available for an ArcGIS organization licensed with the Indoors extension.

Summary

Creates or updates employee or occupant point data that conforms to the ArcGIS Indoors Information Model.

This tool generates point features based on input building spaces (units) and enriches those points with occupant data. The output of this tool can be used to support indoor analysis and functionality—such as searching, routing, workspace reservation, and space planning—in the Indoors web and mobile apps.

Usage

  • The Input Unit Features parameter value must be a feature layer or feature class from an Indoors geodatabase or indoor dataset.

  • The Input Unit Features value must include the AREA_ID field described by the Indoors model for the Units feature class.

  • The Input Occupant Table parameter value must be a geodatabase table, a sheet in a Microsoft Excel workbook (.xls or .xlsx file), or a comma-delimited text file (.csv).

  • The Input Occupant Table value must include the following fields:

    • KNOWNAS—The first and last name most likely to be used when searching for an occupant
    • EMAIL—The occupant's email address
    • CONTACT_PHONE—The occupant's telephone number
    • CONTACT_EXTENSION—The occupant's associated extension code if applicable

  • You can include the following fields in the Input Occupant Table to enhance the Space Planner app experience:

    • ORG_LEVEL_1—The occupant's team.
    • ORG_LEVEL_2—The occupant's department.
    • JOB_TITLE—The occupant's job title.
    • START_DATE—The occupant's start date.
    • SITE_NAME—The occupant's associated site. Values in this field must match those in the NAME field in the Sites feature class.

    Learn more about loading occupant data

  • The tool supports loading occupants that are not assigned to a space. If the Occupant ID Field parameter value is NULL, the occupant will be loaded as unassigned.

  • By default, the coordinate system of the Input Unit Features parameter will be used for the Output Occupant Feature Class parameter. This can be overridden by the Output Coordinate System geoprocessing environment setting.

  • The output Occupants feature class will include the following fields populated based on the Input Unit Features parameter:

    • LEVEL_ID
    • UNIT_ID
    • UNIT_NAME

    The LEVEL_ID and UNIT_ID fields will be populated with the corresponding values from the Input Unit Features parameter. The UNIT_NAME field will be populated with the NAME value for the corresponding input unit feature.

  • The Output Occupant Feature Class value includes the following fields used by the Indoor Space Planner app:

    • AREA_ID
    • ORG_LEVEL_1
    • ORG_LEVEL_2
    • JOB_TITLE
    • START_DATE
    • SITE_ID

    Note:

    The SITE_ID field will be populated based on the following:

    • If an occupant is assigned to a unit, the SITE_ID field will be populated based on the assigned unit's associated site.
    • If an occupant is not assigned to a unit, the SITE_ID field will be populated based on the SITE_NAME field if it is included in the input occupant table.
    • If an occupant is not assigned to a unit and the SITE_NAME field is not included in the Input Occupant Table value, is assigned a NULL value, or is assigned a value that does match a value in the NAME field in the Sites feature class, the SITE_ID field will be populated with a NULL value.
  • When preparing a map for the Indoor Viewer, Space Planner, ArcGIS Indoors for iOS, or ArcGIS Indoors for Android client apps, you can use the tool's output in the map's People layer.

  • The tool updates the Input Unit Features attributes used by Space Planner. If an occupant point feature is generated for a unit, that unit's attributes are updated as follows:

    • ASSIGNMENT_TYPE is set to Office.
    • AREA_ID is set to NULL.

Parameters

LabelExplanationData Type
Input Unit Features

The input polygon features representing building spaces that may be occupied. In the ArcGIS Indoors Information Model, this is the Units layer. The centroid of each space will be used as the point location of the occupant or occupants.

Feature Layer
Unit ID Field

The field in the Input Unit Features parameter values that will be used as the primary key to associate building spaces with records in the Input Occupant Table parameter value.

Field
Input Occupant Table

The input table that contains information about building occupants.

The information can be stored in a geodatabase table, a sheet in an Excel workbook (.xls or .xlsx file), or a .csv file.

Table View
Occupant ID Field

The field in the Input Occupant Table parameter value that will be used as the primary key to associate occupants with Input Unit Features parameter values.

Field
Output Occupant Feature Class

The output feature class created from joining the Input Unit Features and Input Occupant Table parameter values.

Feature Class

Derived Output

LabelExplanationData Type
Updated Unit Feature Class

The updated Input Unit Features layer.

Feature Class

arcpy.indoors.GenerateOccupantFeatures(in_unit_features, unit_id_field, in_occupant_table, occupant_id_field, out_occupant_feature_class)
NameExplanationData Type
in_unit_features

The input polygon features representing building spaces that may be occupied. In the ArcGIS Indoors Information Model, this is the Units layer. The centroid of each space will be used as the point location of the occupant or occupants.

Feature Layer
unit_id_field

The field in the in_unit_features parameter values that will be used as the primary key to associate building spaces with records in the in_occupant_table parameter value.

Field
in_occupant_table

The input table that contains information about building occupants.

The information can be stored in a geodatabase table, a sheet in an Excel workbook (.xls or .xlsx file), or a .csv file.

Table View
occupant_id_field

The field in the in_occupant_table parameter value that will be used as the primary key to associate occupants with in_unit_features parameter values.

Field
out_occupant_feature_class

The output feature class created from joining the in_unit_features and in_occupant_table parameter values.

Feature Class

Derived Output

NameExplanationData Type
updated_unit_feature_class

The updated Input Unit Features layer.

Feature Class

Code sample

GenerateOccupantFeatures example 1 (Python window)

The following Python window script demonstrates how to use the GenerateOccupantFeatures function in immediate mode. In this example, the inputs and outputs are all in the same geodatabase.

import arcpy
arcpy.indoors.GenerateOccupantFeatures('C:/Indoors/ExampleCampus.gdb/Indoor/Units', 
                                       'UNIT_ID', 
                                       'C:/Indoors/ExampleCampus.gdb/EMPLOYEEINFO', 
                                       'LOCATION', 
                                       'C:/Indoors/ExampleCampus.gdb/Indoor/Occupants')
GenerateOccupantFeatures example 2 (stand-alone script)

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

# Name: Indoors_GenerateOccupantFeatures_example2.py
# Description: Imports occupant information from an Excel spreadsheet to a 
#              point feature class in an indoor dataset or Indoors geodatabase.

import arcpy

# Use the Units feature class in the indoor dataset or Indoors geodatabase as the input unit features
in_unit_features = 'C:/Indoors/ExampleCampus.gdb/Indoor/Units'

# The join will use the NAME field from Units feature class
unit_id_field = 'NAME'

# Use an Excel spreadsheet as the input occupant table
in_occupant_table = r'C:\Indoors\EmployeeInfo.xls\MarketingDept$'

# The spreadsheet's OFFICE column has values that match those in Units' NAME field
occupant_id_field = 'OFFICE'

# Output Occupants feature class
out_occupant_feature_class = 'C:/Indoors/ExampleCampus.gdb/Indoor/Occupants'

# Execute GenerateOccupantFeatures
arcpy.indoors.GenerateOccupantFeatures(in_unit_features, unit_id_field, 
                                       in_occupant_table, occupant_id_field, 
                                       out_occupant_feature_class)

Licensing information

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

Related topics