Available for an ArcGIS organization licensed with the Indoors extension.
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 Indoors mapping and routing.
The Input Unit Features parameter must be a feature layer or feature class that conforms to the Indoors Information Model for the Units feature class.
The Input Unit Features must include the AREA_ID field described by the Indoors Information Model for the Units feature class.
The Input Occupant Table parameter must be a geodatabase table, a sheet in an Excel workbook (.xls or .xlsx file), or a comma-delimited text file (.csv).
The Input Occupant Table 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
By default, the coordinate system of the Input Unit Features will be used for the Output Occupant Feature Class parameter. This can be overridden by the Output Coordinate System geoprocessing environment setting.
The tool's output includes the following fields that the Indoor Space Planner app uses:
It is not necessary or recommended that you add to the AREA_ID field to your input table. This field is managed by the Indoor Space Planner app. Update your input table with the other fields and provide populated values for an enhanced experience.
When preparing a map for the Viewer, Indoors for iOS, or 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.
GenerateOccupantFeatures(in_unit_features, unit_id_field, in_occupant_table, occupant_id_field, out_occupant_feature_class)
The input polygon features representing building spaces that may be occupied. In the 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.
The field in the Input Unit Features that will be used as the primary key to associate building spaces with records in the 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.
The field in the Input Occupant Table that will be used as the primary key to associate occupants with Input Unit Features.
The output feature class created from joining the Input Unit Features and Input Occupant Table parameter values.
The updated Input Unit Features layer.
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/Indoors/Units', 'UNIT_ID', 'C:/Indoors/ExampleCampus.gdb/EMPLOYEEINFO', 'LOCATION', 'C:/Indoors/ExampleCampus.gdb/Indoors/People')
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 # points feature class in an Indoors geodatabase. import arcpy # Use the Indoors geodatabase's Units feature class as the input unit features in_unit_features = 'C:/Indoors/ExampleCampus.gdb/Indoors/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 People Points feature class out_occupant_feature_class = 'C:/Indoors/ExampleCampus.gdb/Indoors/People' # Execute GenerateOccupantFeatures arcpy.indoors.GenerateOccupantFeatures(in_unit_features, unit_id_field, in_occupant_table, occupant_id_field, out_occupant_feature_class)
- Basic: No
- Standard: No
- Advanced: Requires Indoors