Feature To 3D By Time (Crime Analysis and Safety)

Summary

Creates a 3D feature class using date values from input features.

Usage

  • This tool can be used to visualize the patterns of cell phone movement over space and time using 3D. The tools converts a 2D cell phone records feature class into 3D based on the space and time attributes of the features. The start time field determines the height of each feature, and the height difference between each feature represents the number of seconds between the calls.

  • A ZVALUE field will be added to the output with values based on the Time Z Interval and Unit parameter value.

  • When using this tool to compare two feature classes, use the same Base Date and Time, Base z-value, and Time Z Interval and Unit parameter values for each feature class.

Syntax

FeatureTo3DByTime(in_features, out_feature_class, date_field, {time_z_unit}, {base_z}, {base_date})
ParameterExplanationData Type
in_features

The features used to create 3D features.

Feature Layer
out_feature_class

The output z-enabled feature class.

Feature Class
date_field

A date field from the input that will be used to calculate the extrusion of the feature..

Field
time_z_unit
(Optional)

The time interval and unit that will be represented by one vertical linear unit in the output feature class.

For example, if the output feature class has a vertical coordinate system based in meters and this parameter has a value of 1 second, the resulting feature class will have features extruded in which 1 meter of elevation is equal to 1 second of time.

Time Unit
base_z
(Optional)

The base z-value from which the output feature will start the extrusion.

Long
base_date
(Optional)

The date and time on which the time extrusion will be based.

When no value is specified, the minimum date value of the input will be used.

Date

Code sample

FeatureTo3DByTime example 1 (Python window)

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

import arcpy
arcpy.env.workspace = r"C:/data/city_pd.gdb"
arcpy.ca.FeatureTo3DByTime("CDR_Phone_1_Sites","CDR_Phone_1_SitesZTime", "starttime")
FeatureTo3DByTime example 2 (stand-alone script)

The following Python script demonstrates how to use the FeatureTo3DByTime function in a stand-alone script.

# Name: FeatureTo3DByTime.py
# Description: Creates a 3D feature class of call detail record data using the 
# time each call was started.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:\data\city_pd.gdb"

# Set local variables
in_features = "CDR_Phone_1_Sites"
out_feature_class = "CDR_Phone_1_SitesZTime"
date_field = "starttime"
time_z_unit = "5 Minutes"
base_z = 100
base_date = "2/9/2019 8:01:00 AM"

# Execute FeatureTo3DByTime
arcpy.ca.FeatureTo3DByTime(in_features, out_feature_class, date_field, 
                           time_z_unit, base_z, base_date)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics