Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
extract_categorical_map_attributes [2014/04/11 20:54]
admin [Optional Inputs]
extract_categorical_map_attributes [2026/08/28 03:17] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Extract Categorical Map Attributes =====+====== Extract Categorical Map Attributes ​======
  
 ===== Description ===== ===== Description =====
  
-This functor extracts the attributes and calculates ​basic statistics from a map and as a result creates ​a table that contains ​the extracted attributes.+Calculates ​basic statistics from a map for each class delimited by a categorical map, returning them as a table indexed jointly by attribute and class. All layers of the map are analyzed together, and the resulting table refers to them jointly.
  
 ===== Inputs ===== ===== Inputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Map  | [[Map Type|Map]]  | Map whose attributes will be extracted. ​ | +| Map  | [[Map Type]] ​ | Map whose attributes will be extracted. ​ | 
-| Categorical Map  | [[Categorical Map Type|Categorical Map]]  | Map whose classes ​will be used to break the input map into subregions.  | +| Categorical Map  | [[Categorical Map Type]] ​ | Map of classes used to delimit ​the calculation area for each class in Map.  |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name ^ Type ^ Description ^ Default Value ^ +^ Name  ^ Type  ^ Description ​ ^ Default Value  
-| Extract Statistical Attributes ​ | [[Bool Type|Bool ]]  | If true, [[Extract Map Attributes#​Statistical attributes|statistical attributes]] will be calculated. | True  |+| Extract Statistical Attributes ​ | [[Boolean Value Type]] ​ | If true, statistical attributes ​(mean, variance, standard deviation, mode, median, unique count) are also extracted Yes  |
  
 ===== Outputs ===== ===== Outputs =====
  
-^ Name ^ Type ^ Description ^ +^ Name  ^ Type  ^ Description ​ 
-| Attributes | [[Lookup ​Table Type|Lookup Table]]  | Table containing the attributes ​extracted from a map+| Attributes ​ | [[Table Type]] ​ | Table of extracted ​attributes, keyed by attribute and by class.  |
-| Layer Attributes | [[Table Type|Table]] ​ | Table containing the layer attributes. ​|+
  
 ===== Group ===== ===== Group =====
Line 29: Line 27:
 ===== Notes ===== ===== Notes =====
  
-This functor analyzes all map layers. The resulting table refers to all of them.+Attributes has columns "​Attribute"​ (key, the attribute'​s numeric code) and "​Category"​ (key, the class value from Categorical Map), with the corresponding statistic in the "​Value"​ data column.
  
-The functor employs a lookup table with keys to the attributes. ​Each key has a predefined name. This name can be used to retrieve ​the corresponding attribute ​in [[Calculate Map]], [[Calculate Categorical Map]], [[Calculate Value]] and [[Calculate Lookup Table]].+Each attribute ​has a predefined name that can be used to retrieve ​it by name (rather than by numeric key) in [[Calculate Map]], [[Calculate Categorical Map]], [[Calculate Value]]and the lookup table calculators.
  
-If it is not possible to determine any of these attributesthe corresponding ​entry in the lookup table is left blankIt determines the maximum ​and the minimum ​values only when there is at least one non null cell on the map.+If an attribute cannot be determined for a classits entry is omitted from Attributes rather than being filled with a placeholderMinimum and maximum values ​are only determined ​when the class has at least one non-null cell.
  
-==== Basic Attributes ==== +Dynamic attributes, computed across all non-null ​cells of all layers ​within each class:
- +
-^ Key  ^ Predefined Name  ^ Description ​ ^ +
-| 1  | "​lines" ​ | number of lines  | +
-| 2  | "​columns" ​ | number of columns ​ | +
-| 3  | "cells" ​ | number ​of cells (number of lines multiplied by the number of columns) ​ | +
-| 4  | "layers" ​ | number of layers ​ | +
-| 5  | "​cellHeight" ​ | cell height (in meters) ​ | +
-| 6  | "​cellWidth" ​ | cell width (in meters) ​ | +
-| 7  | "​cellArea" ​ | cell area (in hectares) ​ | +
-| 19  | "​cellType" ​ | [[Extract Map Attributes#​Cell Type Codes|cell type code]] ​ | +
-| 20  | "​nullValue" ​ | null value  | +
- +
-==== Dynamic attributes ====+
  
 ^ Key  ^ Predefined Name  ^ Description ​ ^ ^ Key  ^ Predefined Name  ^ Description ​ ^
 | 8  | "​nullCells" ​ | number of null cells  | | 8  | "​nullCells" ​ | number of null cells  |
-| 9  | "​nonNullCells" ​ | number of non null cells  |+| 9  | "​nonNullCells" ​ | number of non-null cells  |
 | 10  | "​minCell" ​ | minimum value (excluding null cells) ​ | | 10  | "​minCell" ​ | minimum value (excluding null cells) ​ |
 | 11  | "​maxCell" ​ | maximum value (excluding null cells) ​ | | 11  | "​maxCell" ​ | maximum value (excluding null cells) ​ |
 | 12  | "​cellSum" ​ | sum of the values (excluding null cells) ​ | | 12  | "​cellSum" ​ | sum of the values (excluding null cells) ​ |
  
-==== Statistical attributes ​====+Statistical attributes ​(present only when Extract Statistical Attributes is true), computed across all non-null cells of all layers within each class:
  
 ^ Key  ^ Predefined Name  ^ Description ​ ^ ^ Key  ^ Predefined Name  ^ Description ​ ^
Line 67: Line 52:
 | 18  | "​uniqueCells" ​ | total unique occurrences (excluding null cells) ​ | | 18  | "​uniqueCells" ​ | total unique occurrences (excluding null cells) ​ |
  
-==== Cell Type Codes ==== 
- 
-The codes used to represent all the possible [[cell_type_type|cells types]], corresponding to attribute key 19 ("​cellType"​),​ are listed below. It is possible to convert the corresponding code back into a [[Cell Type Type|Cell Type]]. 
- 
-^ Key  ^ Cell Type  ^  
-| 0  | Unsigned 1 Bit Integer ​ | 
-| 1  | Signed 8 Bit Integer ​ | 
-| 2  | Unsigned 8 Bit Integer ​ | 
-| 3  | Signed 16 Bit Integer ​ | 
-| 4  | Unsigned 16 Bit Integer ​ | 
-| 5  | Signed 32 Bit Integer ​ | 
-| 6  | Unsigned 32 Bit Integer ​ | 
-| 7  | IEEE 754 32 Bit Real  | 
-==== Layer Attributes ==== 
- 
-The layer attributes((Currently,​ only the layer name is the only layer specific attribute returned.)) are returned in a second table. This table has the following format. 
- 
-^ Column Name  ^ Key or Data?  ^ Column Type  ^ Description ​ ^ 
-| "​Layer_Index" ​ | Key  | Real  | The index of the corresponding layer  | 
-| "​Layer_Name" ​ | Key  | String ​ | The name of the corresponding layer  | 
-  
 ===== Internal Name ===== ===== Internal Name =====
  
 ExtractCategoricalMapAttributes ExtractCategoricalMapAttributes