FindNearest

Titleā€ƒ FindNearest

Summary

Measures the straight-line distance, driving distance, or driving time from features in the analysis layer to features in the near layer, and copies the nearest features in the near layer to a new layer. Returns a layer containing the nearest features and a line layer that links the start locations to their nearest locations.


Usage

Syntax

Parameter Explanation
analysisLayer

For each feature in this layer, the task finds the nearest features from the nearLayer.

nearLayer

The features from which the nearest locations are found.

measurementType

The nearest locations can be determined by measuring straight-line distance, driving distance, or driving time

maxCount (Optional)

The maximum number of near locations to find for each feature in analysisLayer.

searchCutoff (Optional)

Limits the search range to this value

searchCutoffUnits (Optional)

The units for the value specified as searchCutoff

timeOfDay (Optional)

When measurementType is DrivingTime, this value specifies the time of day to be used for driving time calculations based on traffic.

timeZoneForTimeOfDay (Optional)

outputName (Optional)

Additional properties such as output feature service name

context (Optional)

Additional settings such as processing extent and output spatial reference

includeRouteLayers (Optional)

Code Samples

Tags

find nearest, near, closest, closest facility, find, search

Credits

Use limitations