Dist_matrix
Network functions dist_matrix
syntax
- dist_matrix(points, maxSqrDistPoint, features, maxSqrDistFeature)
- dist_matrix(points, maxSqrDistPoint, features, maxSqrDistFeature, max_nr_matches)
- dist_matrix_eq(points, pointKey, maxSqrDistPoint, features, featureKey, maxSqrDistFeature[, max_nr_matches])
- dist_matrix_ne(points, pointKey, maxSqrDistPoint, features, featureKey, maxSqrDistFeature[, max_nr_matches])
definition
Since GeoDMS 20.19.2. dist_matrix is the variant of Connect_matrix that reports only the distance of each (feature, point) pair within the cutoff.
Its result is the same new Domain unit of pairs, with arc_rel, point_rel and dist, but without CutPoint, InArc, InSegm and SegmID. Note that — unlike dist_info, whose result is a plain Attribute of the points — the two relations are still there: the pair domain is new, so without them the distances could not be related to anything.
See Connect_matrix for the two cutoffs, for max_nr_matches, for the order of the result and for the _eq / _ne rule.
example
unit<uint32> pand2turbine := dist_matrix(
turbine/geometry, sqr(turbine/norm_afstand)
, pand/geometry, sqr(pand/max_afstand));
attribute<float64> dichtstbijzijnde (pand) := min(pand2turbine/dist, pand2turbine/arc_rel);
see also
- Connect_matrix - the same pairs, with the cut point of each connection
- dist_info - only the nearest feature per point