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)

pointBarrierLayer (Optional)

Specify one or more points to act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets.

lineBarrierLayer (Optional)

Specify one or more lines that prohibit travel anywhere the lines intersect the streets.

polygonBarrierLayer (Optional)

Specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.

Code Samples

Tags

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

Credits

Use limitations