Differences

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

Link to this comparison view

Next revision
Previous revision
calc_neighborhood [2011/07/25 20:49]
hermann created
calc_neighborhood [2026/08/28 03:11] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Calc Neighborhood ====== ​+====== Calc Neighborhood ======
  
 ===== Description ===== ===== Description =====
  
-This functor calculates the list of first order neighbors for each source ​feature.+This functor calculates the relationship ​of neighboring features in a feature ​map.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name     ​^ Type                                        ^ Description ​                                              ​+^ Name  ^ Type  ^ Description ​ 
-| Source ​  ​| [[Categorical Map Type|Categorical Map  ​]]  | Map whose non-null cells correspond to source ​features. ​  ​|+| Source ​ | [[Categorical Map Type]] ​ | Map whose non-null cells correspond to features. ​If Source does not define a null value, this functor reports an error.  ​|
  
-===== Output ​=====+===== Optional Inputs ​=====
  
-^ Name          ^ Type                                              ^ Description ​                                          ​+^ Name  ^ Type  ^ Description ​ ^ Default Value  ​
-Neighborhood ​ | [[Neighborhood Table Type|Neighborhood Table  ​]] ​ | Neighbors for each source feature on the source map.  |+Only Orthogonals Are Allowed ​ | [[Boolean Value Type]]  ​If true, only cells connected orthogonally (horizontally/​vertically) are considered neighbors. This is an advanced port.  | No  | 
 +| Window Lines  | [[Positive Integer Value Type]]  | Number of lines of the neighbor search window. Even values are rounded up to the nearest odd number. This is an advanced port.  | 3  | 
 +| Window Columns ​ | [[Positive Integer Value Type]] ​ | Number of columns of the neighbor search window. Even values are rounded up to the nearest odd number. This is an advanced port.  | 3  | 
 + 
 +===== Outputs ===== 
 + 
 +^ Name  ^ Type  ^ Description ​ ^ 
 +| Neighborhood ​ | [[Neighborhood Table Type]] ​ | Relationship of neighboring features.  |
  
 ===== Group ===== ===== Group =====
Line 20: Line 27:
  
 ===== Notes ===== ===== Notes =====
 +
 +Only the values present in Source'​s categorization are used to calculate neighbors; other values are ignored.
 +
 +A reflexive relationship,​ with weight 0.0, is always defined for every value present in the categorization,​ so that even values without neighbors are represented in the resulting table.
 +
 +A relationship between two neighbors always has weight 1.0, and is represented by two entries: the relationship found and its symmetric counterpart.
  
 ===== Internal Name ===== ===== Internal Name =====