dist_info
Network functions dist_info
syntax
- dist_info(arcs, points, [optional] maxSqrDist)
definition
The dist_info(arcs, points) function is used to get the distance between the point from the points and the CutPoint on the arc/polygon outline from the arcs. This is the same as the dist attribute from the Connect_info function.
description
The arcs should contain unique geometries. Use the Unique function to make a domain unit with unique geometries.
applies to
- data items arcs and points with fpoint or dpoint Value type
- data item arcs with composition type arc or polygon. Be aware that if you connect points to polygons, use a Split_polygon to avoid connecting to segments that separate different rings (lakes or islands) in a polygon.
conditions
The values type of arcs and points must match.
example
attribute<float32> dist2road (location) := dist_info(road/geometry, location/geometry);
| road/geometry |
|---|
| {2: xy(112631; 399246) xy(111866; 398599)} |
| {3: xy(111866; 398599) xy(111924; 399495) xy(111524; 401801)} |
| {2: xy(114921; 401529) xy(114823; 398584)} |
domain road, nr of rows = 3
| location/geometry |
|---|
| xy(114903; 398600) |
| xy(111741; 398696) |
| xy(112601; 399138) |
| xy(114903; 399289) |
| xy(111803; 399476) |
| xy(115135; 401331) |
| xy(111353; 401729) |
| xy(112156; 401729) |
domain location, nr of rows = 8
| dist |
|---|
| 79.42 |
| 131.00 |
| 63.09 |
| 56.51 |
| 119.52 |
| 220.47 |
| 180.79 |
| 610.40 |
domain location, nr of rows = 8