Particle Track (Spatial Analyst)

Summary

Calculates the path of a particle through a velocity field, returning an ASCII file of particle tracking data and, optionally, a coverage of track information.

Learn more about how Particle Track works

Usage

Syntax

ParticleTrack (in_direction_raster, in_magnitude_raster, source_point, out_track_file, {step_length}, {tracking_time}, {out_track_polyline_features})
ParameterExplanationData Type
in_direction_raster

An input raster where each cell value represents the direction of the seepage velocity vector (average linear velocity) at the center of the cell.

Directions are expressed in compass coordinates, in degrees clockwise from north. This can be created by the Darcy Flow tool.

Direction values must be floating point.

Raster Layer
in_magnitude_raster

An input raster where each cell value represents the magnitude of the seepage velocity vector (average linear velocity) at the center of the cell.

Units are length/time. This can be created by the Darcy Flow tool.

Raster Layer
source_point

The location of the source point from which to begin the particle tracking.

This is entered as numbers identifying the x,y coordinates of the position in map units.

Point
out_track_file

The output ASCII text file that contains the particle tracking data.

File
step_length
(Optional)

The step length to be used for calculating the particle track.

The default is one-half the cell size. Units are length.

Double
tracking_time
(Optional)

Maximum elapsed time for particle tracking.

The algorithm will follow the track until either this time is met or the particle migrates off the raster or into a depression.

The default value is infinity. Units are time.

Double
out_track_polyline_features
(Optional)

The optional output line feature class containing the particle track.

This feature class contains a series of arcs with attributes for position, local velocity direction and magnitude, and cumulative length and time of travel along the path.

Feature Class

Code Sample

ParticleTrack example 1 (Python window)

This example executes the tool on the required inputs and outputs an ASCII file of particle tracking data and a shapefile featureclass of the particle track.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
ParticleTrack("gwdir", "gwmag", arcpy.Point(-200,-200), 
              "C:/sapyexamples/output/trackfile.txt",10, 100000, 
              "C:/sapyexamples/output/trackpolyline.shp")
ParticleTrack example 2 (stand-alone script)

This example executes the tool on the required inputs and outputs an ASCII file of particle tracking data and a shapefile featureclass of the particle track.

# Name: ParticleTrack_Ex_02.py
# Description: Calculates the path of a particle through a velocity field.
# Requirements: Spatial Analyst Extension
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inDirectionRaster = "gwdir"
inMagnitudeRaster = "gwmag"
sourcePoint = arcpy.Point(-200, -200)
outTrackFile = "C:/sapyexamples/output/trackfile.txt"
stepLength = 10
trackingTime = 10000000
outTrackPolylineFeatures = "C:/sapyexamples/output/trackpolyline.shp"

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute ParticleTrack
ParticleTrack(inDirectionRaster, inMagnitudeRaster, sourcePoint, outTrackFile,
              stepLength, trackingTime, outTrackPolylineFeatures)

Environments

Related Topics

Licensing Information

ArcView: Requires Spatial Analyst
ArcEditor: Requires Spatial Analyst
ArcInfo: Requires Spatial Analyst

6/29/2011