griddist_maximp - ObjectVision/GeoDMS GitHub Wiki

Grid functions griddist_maximp

The griddist_maximp function calculates grid-based distances with a maximum impedance cutoff.

syntax

griddist_maximp(impedanceGrid: raster->Float, pointset_raster_rel: pointset->raster, maxImp: Float)
griddist_maximp(impedanceGrid: raster->Float, pointset_raster_rel: pointset->raster, maxImp: Float, startvalues: pointset->Float)

Additional variants:

  • griddist_maximp_untiled - non-tiled variant
  • griddist_maximp_latitude_specific - accounts for latitude-dependent cell sizes
  • griddist_maximp_untiled_latitude_specific - combination of the above

definition

Similar to Griddist, but with an additional maximum impedance parameter. Cells with accumulated impedance greater than maxImp will have undefined values in the result.

arguments

argument description type
impedanceGrid Impedance value for each cell (non-negative) raster->Float
pointset_raster_rel Relation from points to raster cells pointset->raster
maxImp Maximum accumulated impedance cutoff Float
startvalues (optional) Initial impedance values at start points pointset->Float

performance

The algorithm uses Dijkstra's shortest path algorithm on the grid graph. Complexity is O(n × log n) where n is the number of reachable cells (limited by maxImp).

The maxImp parameter significantly improves performance by limiting the search space - only cells reachable within the maximum impedance are processed.

conditions

  • impedanceGrid values must be non-negative
  • maxImp must be non-negative
  • Value types of impedanceGrid, maxImp, and startvalues must be compatible Float types

example

attribute<Float64> travel_time (GridDomain) := griddist_maximp(
    travel_cost,
    destination/GridDomain_rel,
    3600.0  // max 1 hour in seconds
);

see also

since version

5.85

⚠️ **GitHub.com Fallback** ⚠️