# **Grid functions**

Grid operators-and-functions functions are used to calculate with data items of grid (two-dimensional) domains, explicitly using the two-dimensional structure of data in grid, like potential or district.

- dist2 -
*the distances in a grid towards a point data item* - griddist -
*impedance in a grid towards the nearest point in a pointset, summing the resistances of the shortest path to the nearest point*

- potential -
*a neighborhood operation to sum the values of neighbouring cells in a grid, based on a kernel* - proximity -
*a neighborhood operation to get the maximum value of neighbouring cells in a grid, based on a kernel* - diversity -
*the number of different occurrences in the neighbourhood of each cell in a grid*

- district -
*partition according to areas of adjacent (horizontal & vertical, not diagonal) grid cells with the same values* - district_8 -
*partition according to areas of adjacent (horizontal & vertical & diagonal) grid cells with the same values* - perimeter -
*for each occurring partition count the number of edges that cells of that partition have with other cells or the raster border* - perimeter_weighted -
*same, but with provided weights for the North, East, South, and West edges*

- raster_merge -
*to merge data from smaller to larger grids, e.g. to combine country grids to a European grid*