Maptitude GISDK Help |
Computes distances and statistics from each point in a set of origins to each point in a set of destinations.
Added to Version 2016.
dist = GetDistances(string orig_layer_set, array options)
Argument |
Contents |
orig_layer_set |
A string with the layer|set of the points of origin |
options |
An array of options |
Option |
Type |
Contents |
Radius |
Number |
Maximum distance considered (0.0, the default, represents all) |
Destination Layer |
String |
A layer|set of destination points; the default is to use the origin layer without set consideration if the Network option is not used |
Statistic Fields |
String |
The full field specs of the destinations |
Network |
Array |
An options array of network options; if this is not passed, Euclidean distance is assumed; see options below |
Output |
Array |
An options array; see options below |
Statistics |
Array |
An array of strings; the first element refers to distance or network impedance and the others correspond to the requested statistics; see elements below |
The Network options are:
Option |
Type |
Contents |
Network |
String |
A network to work with (could be a backbone network) |
Network Field |
String |
The name of the impedance field in the network |
CutOff |
Number |
The maximum impedance for the shortest path calculation (optional) |
Street Field |
String |
The field spec of the impedance field in the line layer (not necessary if not the backbone) |
Street Layer |
String |
The layer|set for link geography |
The Output options are:
Option |
Type |
Contents |
IDs |
Vector |
A vector of the origin IDs |
Count |
Number |
The number of acceptable destinations |
The Statistics elements are:
Element |
Type |
Contents |
Averages |
Vector |
The averages |
Standard Deviations |
Vector |
The standard deviations |
Minimum |
Vector |
The minimum values (if the origin point is included in the destinations it is ignored) |
Maximum |
Vector |
The maximum values |
Min ID |
Vector |
The IDs of destination points that have the smallest value (corresponds to the "Minimum" values above) |
Max ID |
Vector |
The IDs of destination points that have the largest value (corresponds to the "Maximum" values above) |
An array of the Output and Statistics values.
If the origin point appears as a destination, it is ignored in the statistics for that point.
Function |
Summary |
Computes the azimuth (heading) for a line between two points |
|
Computes the great circle distance between two coordinates |
|
Finds the distance from a coordinate to a line |
|
Gets the current map measurement units |
|
Returns the azimuth of the AB or BA direction of a line |
|
Sets the current map measurement unit |
©2025 Caliper Corporation | www.caliper.com |