Griddist

grid-functions griddist

syntax

  • griddist(impedanceGrid: raster->Float, pointset_raster_rel: pointset->raster)
  • griddist_maximp(impedanceGrid: raster->Float, pointset_raster_rel: pointset->raster, maxImp: Float)
  • griddist_zonal(impedanceGrid: raster->Float, pointset_raster_rel: pointset->raster, zoneGrid: raster->UInt16, zoneBarrier: Float)
  • griddist_zonal_maximp(impedanceGrid: raster->Float, pointset_raster_rel: pointset->raster, zoneGrid: raster->UInt16, zoneBarrier: Float, maxImp: Float)

Where each variant:

  • can have an optional additional argument startvalues: pointset->Float
  • can be suffixed by _untiled and/or
  • can be suffixed by _latitude_specific, in that order.

definition

griddist(impedanceGrid, pointset_raster_rel, startvalues) results in an impedance value for each cell of [[raster]] which is the lowest sum of impedances of paths towards any point in the pointset.

The function can have the following arguments:

  • impedanceGrid: raster->nonnegative values, an attribute of a [[raster domain]] with an impedance for each cell (e.g. based on slope and/or land use type);
  • pointset_raster_rel: pointset->raster, a relation from a pointset to the raster domain. The pointset contains the locations, from which impedances are calculated. See point-2-grid for how to configure such a relation.
  • zonalGrid
  • boundaryImp
  • maxImp
  • startvalues: pointset->nonnegative values, the initial impedance values for the point set; can be const(0.0, pointset)

The resulting values-unit of the impedance item has a float32 or float64 value-type, based on the value type of the impedance, startvalues, boundaryImp, and/or maxImp arguments.

The resulting domain-unit is the domain unit of the impedance argument.

description

The griddist function is often used to calculate off-road or future accessibility, where e.g. geophysical factors are assumed to be important factors for assessing accessibility.

conditions

  • The values unit of the arguments impedance and startvalues must match.
  • The domain unit of the arguments pointset_raster_rel and startvalues must match.
  • the values of the first and third argument cannot be negative.

See also

impedance-functions

since version

5.85

not yet implemented

  • an aspect ratio is required to make griddist useful on a non-square rectangular raster
  • a row specific aspect ratio is required to make griddist useful on a lat-long raster
  • a cell-specific (2x2) metric is required to make griddist useful on a generic projection

example

attribute<GridDomain> GridDomain_rel (destination);
attribute<float64>    griddist       (GridDomain) := griddist(resistance, GridDomain_rel, const(0.0, destination));

resistance

         
1 1 1 1 1
2 3 0 0 1
2 4 5 1 1
5 6 3 2 2
2 2 1 1 1

GridDomain, nr of rows = 5, nr of cols = 5

GridDomain_rel
{1, 1}
{1, 3}
{4, 1}
{4, 4}

domain destination, nr of rows = 4

griddist

         
1.71 0.71 0.50 0.50 0.71
2.50 0 0 0 0.50
3.54 2.83 2.50 0.50 0.71
4.95 4 3.33 2 0.71
2 0 1.50 1 0

GridDomain, nr of rows = 5, nr of cols = 5