logo-header

 
 

syntax

  • dist2(point(column, row, pointunit), valuesunit)

definition

dist2(point(column, row, pointunit), valuesunit) results in a new grid attribute with the distances to the coordinate specified with the point function. The parameters or constants column and row are the coordinates used in this point function. Argument pointunit is the focal point unit. Argument valuesunit is the values unit of the resulting attribute.

description

The dist2 function is mainly used in the configuration of a focal point matrix, also known as a kernel, used for potential calculations in grids.

applies to

See for arguments column, row and pointunit the point function.

Unit valuesunit with uint32 value type

since version

5.15

example

unit<spoint> pot3Range: Range = "[{-1, -1}, {2, 2})" 
{
attribute<uint32> distMatr := dist2(point(0s, 0s, pot3Range), uint32);
}
pot3Range/distMatr
2 1 2
1 0 1
2 1 2
domain pot3Range, nr of rows = 3, nr of cols = 3

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