Track Intervals To Feature (Tracking Analyst)

Niveau de licence :BasicStandardAdvanced

Récapitulatif

Calculates values that are computed from the difference between successively ordered features in a track. New fields are added to the input feature class or layer to store the calculated values (distance, duration, speed, and course).

Illustration

Track Intervals To Feature illustration

Utilisation

Syntaxe

TrackIntervalsToFeature_TA (in_features, time_field, {track_id_field}, {calculation_method}, {time_field_format}, {locale_id}, {am_designator}, {pm_designator}, {distance_field_units}, {distance_field_name}, {duration_field_units}, {duration_field_name}, {speed_field_units}, {speed_field_name}, {course_field_units}, {course_field_name})
ParamètreExplicationType de données
in_features

The input feature class or layer.

Feature Layer
time_field

The field in the input feature class or layer that contains date and time information. This tool requires date and time information to be contained in the same field, and the data type of the field must be Short, Long, Float, Double, Text, or Date.

Field
track_id_field
(Facultatif)

The field that contains data values which are used to group the input features into tracks. The data type of the field can be Short, Long, Float, Double, Text, or OID.

Field
calculation_method
(Facultatif)

Specifies which interval is used to calculate values for each feature.

  • PREVIOUS_AND_CURRENT_FEATUREValues are calculated using the interval between each feature and the previous feature in the track.
  • CURRENT_AND_NEXT_FEATUREValues are calculated using the interval between each feature and the next feature in the track.
String
time_field_format
(Facultatif)

If the data type of the time field is anything other than Date, this parameter determines the format that will be used to interpret data values in the time field. Some examples of formats are:

  • "yyyyMMdd" (standard format valid for Text or Numeric time fields)
  • "yyyy/MM/dd HH:mm:ss" (standard format valid only for Text time fields)
  • "MM-dd-yyyy hh:mm:ss tt" (custom format valid only for Text time fields)

If the data type of the time field is Text, either a standard Esri text time format can be used or a custom format can be specified. However, custom formats cannot be used if you specified KEEP_ON_DISK for the storage policy. If the data type of the time field is numeric (Short, Long, Float, or Double), only standard Esri numeric time formats can be used. If the data type of the time field is Date, this parameter is not needed.

String
locale_id
(Facultatif)

If the data type of the time field is Text, this parameter determines which locale will be used to interpret data values in the time field. For all time field data types other than Text, this parameter is not needed. If no locale is entered, the current locale of the operating system will be used. For a list of available locales supported by your system, open the tool dialog box and expand this drop-down list. When entering the locale as a parameter, it is recommended to use only the locale ID (LCID) assigned by Microsoft, which can be entered as a long integer such as 1033. You can also enter the full string representation of the locale as a parameter, such as "01033-English_(United_States)", but you must replace spaces with underscore characters.

Long
am_designator
(Facultatif)

If the time field data type is Text and the time format is a 12-hour clock representation including a time marker ("t" or "tt"), then this parameter determines the character ("t") or characters ("tt") that designate AM in the time field data values. If nothing is entered, then the default AM designator for the selected locale will be used. For all time field data types other than Text, this parameter is not needed.

String
pm_designator
(Facultatif)

If the time field data type is Text and the time format is a 12-hour clock representation including a time marker ("t" or "tt"), then this parameter determines the character ("t") or characters ("tt") that designate PM in the time field data values. If nothing is entered, then the default PM designator for the selected locale will be used. For all time field data types other than Text, this parameter is not needed.

String
distance_field_units
(Facultatif)

Specifies the distance units that will be used in the output distance field.

  • INCHESInches
  • FEETFeet
  • YARDSYards
  • MILESMiles
  • NAUTICAL_MILESNautical Miles
  • MILLIMETERSMillimeters
  • CENTIMETERSCentimeters
  • METERSMeters
  • KILOMETERSKilometers
  • DECIMETERSDecimeters
String
distance_field_name
(Facultatif)

Specifies the name of the distance field that will be added to the input feature class or layer. If no field name is specified, a name will automatically be chosen.

String
duration_field_units
(Facultatif)

Specifies the time units that will be used in the output duration field.

  • MILLISECONDSMilliseconds
  • SECONDSSeconds
  • MINUTESMinutes
  • HOURSHours
  • DAYSDays
  • WEEKSWeeks
  • MONTHSMonths
  • YEARSYears
String
duration_field_name
(Facultatif)

Specifies the name of the duration field that will be added to the input feature class or layer. If no field name is specified, a name will automatically be chosen.

String
speed_field_units
(Facultatif)

Specifies the speed units that will be used in the output speed field.

  • MILES_PER_HOURMiles Per Hour
  • FEET_PER_HOURFeet Per Hour
  • KILOMETERS_PER_HOURKilometers Per Hour
  • MILES_PER_SECONDMiles Per Second
  • FEET_PER_SECONDFeet Per Second
  • METERS_PER_SECONDMeters Per Second
  • KNOTSKnots
String
speed_field_name
(Facultatif)

Specifies the name of the speed field that will be added to the input feature class or layer. If no field name is specified, a name will automatically be chosen.

String
course_field_units
(Facultatif)

Specifies the course units that will be used in the output course field.

  • DEGREESDegrees
  • RADIANSRadians
String
course_field_name
(Facultatif)

Specifies the name of the course field that will be added to the input feature class or layer. If no field name is specified, a name will automatically be chosen.

String

Exemple de code

TrackIntervalsToFeature example using date field and default units and output field names

This sample shows how to run the tool on a feature class with a date field using the default units and output field names.

import arcpy
arcpy.CheckOutExtension("tracking")
in_features = "C:\Data\Vehicles.gdb\Planes"
time_field = "DATE_TIME"
track_id_field = "ACID"
arcpy.TrackIntervalsToFeature_ta(in_features, time_field, track_id_field)
TrackIntervalsToFeature example using text date field, custom units, and custom field names

This sample shows how to run the tool on a feature class with a date field of data type text, specifying custom units and field names.

import arcpy
arcpy.CheckOutExtension("tracking")
in_features = "C:\Data\Vehicles.gdb\Planes"
time_field = "DATE_TEXT"
track_id_field = "ACID"
calculation_method = "CURRENT_AND_NEXT_FEATURE"
time_field_format = "MM/dd/yyyy HH:mm:ss"
distance_field_units = "MILES"
distance_field_name = "DISTANCE"
duration_field_units = "SECONDS"
duration_field_name = "DURATION"
speed_field_units = "KILOMETERS_PER_HOUR"
speed_field_name = "SPEED"
course_field_units = "DEGREES"
course_field_name = "HEADING"
arcpy.TrackIntervalsToFeature_ta(in_features, time_field, track_id_field, calculation_method, time_field_format, "", "", "", distance_field_units, distance_field_name, duration_field_units, duration_field_name, speed_field_units, speed_field_name, course_field_units, course_field_name)

Environnements

Cet outil n'utilise aucun environnement de géotraitement

Thèmes connexes

Informations de licence

ArcGIS for Desktop Basic: Requis Tracking Analyst
ArcGIS for Desktop Standard: Requis Tracking Analyst
ArcGIS for Desktop Advanced: Requis Tracking Analyst
4/26/2014