Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
calc_pathway_map [2026/06/29 14:58]
chrystian Add usage examples to functor documentation
calc_pathway_map [2026/08/28 03:11] (current)
hermann Sync from local documentation review
Line 3: Line 3:
 ===== Description ===== ===== Description =====
  
-This functor calculates the shortest pathway between ​a feature or selected cell and an existing network of features.+This functor calculates the shortest pathway between ​source features ​and an existing network of paths.
  
 ===== Inputs ===== ===== Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Network ​ | [[Categorical Map Type]] ​ | Map of network of features. Non-null value cells represent ​features. If null cell value is not defined, an error will be reported.  | +| Network ​ | [[Categorical Map Type]] ​ | Map of the initial ​network of paths. Non-null value cells represent ​paths. If Network does not define a null value, ​this functor reports ​an error during execution.  | 
-Source ​ | [[Map Type]] ​ | Source feature map from which pathways are calculatedNon-null value cells represent features. If null cell value is not defined, an error will be reported.  | +Sources ​ | [[Map Type]] ​ | Map of the source features ​from which pathways are searched forFeatures are represented by non-null values.  | 
-Cost  | [[Map Type]] ​ | Accumulated ​cost surface calculated from a feature ​network. ​Values equal to or less than zero represent an existing feature ​network. ​ |+Costs Or Directions ​ | [[Map Type]] ​ | Map of the cost of building paths connecting the chosen destinations to the closest ​network, or map of the direction toward the least-cost cell from the current cellNegative ​or zero costs indicate places where the network ​already exists. ​ | 
 +| Input Represents Directions ​ | [[Boolean Value Type]] ​ | If true, Costs Or Directions is assumed to represent cost directions; otherwise, it is assumed to represent costs. A cost-direction cell can only take the eight values corresponding to the directions of a Moore neighborhood:​ None=0, NW=1, N=2, NE=3, E=4, SE=5, S=6, SW=7, and W=8.  |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^ ^ Name  ^ Type  ^ Description ​ ^ Default Value  ^
-| Use Lottery ​ | [[Boolean Value Type]] ​ | If there is more than one choice to reach the source feature. Dinamica chooses ​randomly ​between both equal value options.  | False  | +| Use Lottery ​ | [[Boolean Value Type]] ​ | If true, and Input Represents Directions ​is false, ties for the lowest cost are broken ​randomly. This is an advanced port.  | No  | 
-| Merge Networks ​ | [[Boolean Value Type]] ​ | If defined, the functor returns ​the initial network ​merged with the new pathways. Otherwise, only the new pathways are returned.  | true  |+| Merge Networks ​ | [[Boolean Value Type]] ​ | If true, the map of new paths is merged into the initial network ​map.  | Yes  |
  
 ===== Outputs ===== ===== Outputs =====
  
 ^ Name  ^ Type  ^ Description ​ ^ ^ Name  ^ Type  ^ Description ​ ^
-| Network ​ | [[Categorical Map Type | Categorical Map]]  | Map with a feature ​network ​updated. Output ​map format ​has the same dimensions ​of the input network ​map.  |+| Network ​ | [[Categorical Map Type]] ​ | Map of the resulting network: the initial ​network map plus the new paths when Merge Networks is true, or just the new paths otherwise. Network ​has the same dimensions ​as the input Network ​map, and a single layer.  |
  
 ===== Group ===== ===== Group =====
Line 29: Line 30:
 ===== Notes ===== ===== Notes =====
  
-Ignores cells with values equal or lesser than 0+A source feature is ignored by the pathway search if the cost or direction cell at its starting position equals the null value; if the null value is found at any other cell along a path, this functor reports an error.
  
-This calculation will inform ​an error if it finds a local minimum on the cost map.+This functor reports ​an error if a local minimum ​is found on the cost map.
  
-[{{ :​calc_pathway_example.png?​nolink&​600 |Example calculating the least costly path for road construction.}}]+Sources uses Map Type, rather than Categorical Map Type, so that Calc Destination Map can be connected directly to it in a typical ​road-construction ​arrangement.
  
 ===== Internal Name ===== ===== Internal Name =====
Line 42: Line 43:
  
 See practical examples of this functor in [[lesson_17|Lesson 17: Building a land-use and land-cover change simulation model]] See practical examples of this functor in [[lesson_17|Lesson 17: Building a land-use and land-cover change simulation model]]
 +