logo-header

 
 

syntax

  • dist(destination, origin)

definition

dist(destination, origin) calculates the distance between origin and destination points of the same domain. The resulting data item has a float32 value type without metric. Use the value function to convert the result to the requested values unit.

description

Use the sqrdist function if only the distance order is relevant as the sqrdist calculates faster.

applies to

destination and origin are data items with Point value type

conditions

The values unit and domain of the destination and origin arguments must match.

since version

5.15

example

attribute<m> distOD (ADomain) := value(dist(destination, origin), m);
destination origin   distOD
{401331, 115135} {401331, 115135} 0
{399501, 111793} {399476, 111803} 26.9
{399339, 114883} {399289, 114903} 53.9
{401804, 111323} {401729, 111353} 80.8
{398796, 111701} {398696, 111741} 107.7
ADomain, nr of rows = 5

see also


OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904