Track layers

After an organization administrator enables location sharing for your organization, track layers are created that contain information about where mobile users are and where they have been. You can use hosted feature layer views of these layers (known as track views) in your maps and apps, allowing you to understand where mobile users have been in relation to other assets and information. You can also use track layers to perform advanced analysis in ArcGIS.

Note:

If you want a more high-level overview of track information and want to perform simple filtering and analysis of tracks, you can view tracks in the Track Viewer web app.

Location sharing schema

When location sharing is enabled for your organization, a Location sharing layer is created that stores the last known location of mobile users, as well as full historical tracks of where mobile users have been. This information is stored in three sublayers, each with a predefined schema: last known locations, tracks, and track lines. When you create track views in the Track Viewer web app, a hosted feature layer view is created for each of these track layers.

The location sharing feature layer and hosted feature layer views are created in a Location sharing folder in the contents of the administrator account that was used to enable location sharing. The location sharing feature layer is named Location sharing and the hosted feature layer views are named the same as the track view for which they were created. You can share these hosted feature layer views with users in your organization by adding them as track viewers when creating the track view. For more information, see Create track views.

Note:

Location sharing feature layers and feature layer views cannot be share with the public.

The location sharing layer does not consume credits for storage. For more information on how credits are used in ArcGIS Online, see Understand credits.

Tracks feature layer

The tracks feature layer (and any hosted feature layer views based on it) is a point layer that contains a record for each location where a mobile user was tracked with the Field Maps, QuickCapture, Survey123, or Indoors mobile app. These records include information about the track point, including whose track it is, the activity type of the mobile user, battery information about their device, their course and altitude (from mean sea level), and the accuracy of the location.

Points are only inserted by the Field Maps, QuickCapture, Survey123, or Indoors mobile app and are never updated or deleted. No filtering is applied to the points that are recorded, and they reflect the raw data from the mobile user's device. The layer is in the WGS 1984 Web Mercator (Auxiliary Sphere) [WGS84] coordinate system, which has the well-known ID (WKID) 4326.

Last known locations (LKL) feature layer

The last known locations feature layer (and any hosted feature layer view based on it) is a point layer that contains a single record for each user representing their most recently reported location. It has the same fields and information as the tracks feature layer, and is also in the WGS84 coordinate system.

The following table lists the fields for both the tracks feature layer and the last known locations feature layer:

FieldDescription
activity

This represents the activity of a mobile user at the time a track is recorded. There are six possible values for this field:

  • Unknown (0)
  • Stationary (1)
  • Walking (2)
  • Running (3)
  • Cycling (4)
  • Automotive (5)

The activity is determined by Core Motion on iOS and ActivityRecognitionClient on Android, with ArcGIS Field Maps, ArcGIS QuickCapture, Survey123, and ArcGIS Indoors honoring the activities common between the two systems. Each of these APIs relies on sensors including accelerometers, gyroscopes, the pedometer, the magnetometer, and the barometer of your device. If you constantly see a value of Unknown, it's possible your device has limited sensors available.

altitude

The altitude of the device measured in meters above mean sea level (MSL).

app_id

The app that recorded the location. This value will be tracker for points uploaded from Tracker.

battery_percentage

The battery percentage of the device. This range is 0 to 100.

battery_state

This represents the state of the device battery. There are four possible values that can be recorded:

  • Unknown (0)
  • Unplugged (1)
  • Charging (2)
  • Plugged and fully charged (3)
category

The category associated with the track.

course

The direction of travel in units of 0 to 360 degrees.

created_user

The username of the mobile user.

created_date

The date and time when the point was uploaded to the server.

device_id

A unique ID given to the device.

floor

The floor number reported by the location service provider.

globalid

The global ID of the feature generated by the server.

full_name

The full name of the user.

horizontal_accuracy

The horizontal accuracy of the recorded location measured in meters.

last_edited_date

The date and time when the point was last edited on the server.

last_edited_user

The username of the user who last edited the feature.

level_id

The floor level recorded when using ArcGIS IPS

location_source

The source of the location (Wi-Fi, GPS, fused, and so on). This is only recorded on Android devices.

location_timestamp

The date and time when the location was recorded by the device.

objectid

The system-managed ID field.

session_id

A unique ID that is generated every time tracking is turned on.

signal_strength

The signal strength of the device. This field is not currently populated in the location sharing layer.

speed

The speed of the device recorded in meters per second.

vertical_accuracy

The vertical accuracy of the recorded location measured in meters.

Note:

All datetime values are recorded in coordinated universal time (UTC).

The location_timestamp represents the date and time when a location was recorded by the mobile app. The last_edited_date represents when the feature was last changed in the server database.

Track lines feature layer

The track lines feature layer (and any hosted feature layer view based on it) is a polyline layer that contains lines representing where a mobile user has been. These lines are automatically generated by the server using the uploaded track points from the tracks feature layer. Track lines are updated approximately every 10 minutes and represent a maximum of one hour in duration. Statistics for each polyline are calculated and stored as attributes in the layer. The layer is in the WGS 1984 Web Mercator (Auxiliary Sphere) [WGS84] coordinate system, which has the well-known ID (WKID) 4326.

The following table lists the fields for the track lines feature layer:

FieldDescription
avg_altitude

The average altitude based on the track points used to generate the line, measured in meters above mean sea level (MSL).

avg_horizontal_accuracy

The average horizontal accuracy based on the track points used to generate the line, measured in meters.

avg_speed

The average speed of the user based on the track points used to generate the line, measured in meters per second.

avg_vertical_accuracy

The average vertical accuracy based on the track points used to generate the line, measured in meters.

category

The category associated with the track.

count

The number of track points used to generate the line.

created_date

The date and time when the line was created.

created_user

The username of the mobile user.

end_time

The end time of the line.

full_name

The full name of the user.

globalid

The global ID of the feature generated by the server.

max_altitude

The highest altitude measured in meters above mean sea level (MSL).

max_battery_percentage

The highest battery percentage of the device. This range is 0 to 100.

max_horizontal_accuracy

The maximum horizontal accuracy measured in meters.

max_speed

The maximum speed measured in meters per second.

max_vertical_accuracy

The maximum vertical accuracy measured in meters.

min_altitude

The lowest altitude measured in meters above mean sea level (MSL).

min_battery_percentage

The lowest battery percentage of the device. This range is 0 to 100.

min_horizontal_accuracy

The minimum horizontal accuracy measured in meters.

min_speed

The minimum speed measured in meters per second.

min_vertical_accuracy

The minimum vertical accuracy measured in meters.

objectid

The system-managed ID field.

last_edited_date

The date and time when the point was last edited on the server.

last_edited_user

The username of the user who last edited the feature.

predominant_activity

The mobile user's most common activity. There are six possible values for this field:

  • Unknown (0)
  • Stationary (1)
  • Walking (2)
  • Running (3)
  • Cycling (4)
  • Automotive (5)

The activity is determined by Core Motion on iOS and ActivityRecognitionClient on Android, with ArcGIS Field Maps, ArcGIS QuickCapture, Survey123, and ArcGIS Indoors honoring the activities common between the two systems. Each of these APIs relies on sensors including accelerometers, gyroscopes, the pedometer, the magnetometer, and the barometer of your device. If you constantly see a value of Unknown, it's possible your device has limited sensors available.

predominant_battery_state

The most common battery state of the device. There are four possible values that can be recorded:

  • Unknown (0)
  • Unplugged (1)
  • Charging (2)
  • Plugged and fully charged (3)
start_time

The start time of the line.

Note:

All datetime values are recorded in coordinated universal time (UTC).

Advanced analysis and configuration

To use the location sharing schema for advanced analysis and configuration, use ArcGIS API for Python. It provides a module to automate the management of track layers, track viewers, and mobile users. In addition to managing content, ArcGIS API for Python can be used to develop more complex analyses of tracks. For examples and best practices, see the sample scripts and notebooks available on GitHub.

Filtering invalid tracks

The Track Viewer web app filters out invalid track points by using the expression shown below. You can use this same expression in Map Viewer to filter out invalid track points on your own map. Apply a filter to the tracks layer in Map Viewer using the following expression:

horizontal_accuracy <= 10 OR (horizontal_accuracy <= 25 AND (speed is not NULL OR course is not NULL)) OR (speed is not NULL AND course is not NULL)

Deleting tracks

While the delete capability for the location sharing layer is not shown in the feature layer definition, administrators can delete tracks through ArcGIS REST API using the delete features operation. Before administrators can delete tracks, location sharing must be disabled in the organization settings.

Browse to the delete features REST endpoint for the tracks layer, where you can specify a where clause or object IDs to identify and delete tracks. The URL of the delete features REST endpoint follows the following format (where host, domain, and webadaptor are replaced by the information about your server):

https://host.domain.com/webadaptor/rest/services/Hosted/location_tracking/FeatureServer/0/deleteFeatures
Note:

The ability to delete tracks is restricted to removing one or more user's tracks in their entirety. This ensures the last known location, tracks, and track lines of the user are completely removed. Deleting individual track points is not supported. To successfully delete a user's tracks, you must use the following parameters in the delete features REST endpoint (as described above):

  • returnDeleteResults = false
  • async = true
  • rollbackOnFailure = false

Additionally, the where clause must use the following format: created_user in ('<username>').

Limitations

Using tracks comes with the following limitations:

  • Tracks in ArcGIS Online can only be exported as shapefiles or CSV files.
  • ArcGIS Online analysis tools cannot be used on location sharing layers.