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_map_attributes [2013/07/10 21:25]
admin
extract_map_attributes [2026/08/28 03:18] (current)
hermann Sync from local documentation review
Line 1: Line 1:
-====== Extract Map Attributes =====+====== Extract 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.+Extracts general ​attributes and basic statistics from a map, returning them as a lookup ​table keyed by a predefined attribute code. 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. ​ |
  
 ===== Optional Inputs ===== ===== Optional Inputs =====
  
-^ Name ^ Type ^ Description ^ Default Value ^ +^ Name  ^ Type  ^ Description ​ ^ Default Value  
-| Extract Dynamic Attributes ​ | [[Bool Type|Bool ]]  | If true, the [[Extract Map Attributes#​Dynamic attributes|dynamic attributes]] will be calculated. | True  | +| Extract Dynamic Attributes ​ | [[Boolean Value Type]] ​ | If true, dynamic attributes ​(null/​non-null cell counts, minimum, maximum, sum) are also extracted Yes  | 
-| Extract Statistical Attributes ​ | [[Bool Type|Bool ]]  | If true, [[Extract Map Attributes#​Statistical attributes|statistical attributes]] will be calculated. | False  |+| 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 ​ | [[Lookup Table Type]] ​ | Table of extracted ​attributes, keyed by attribute code 
-| Layer Attributes | [[Table Type|Table]]  | Table containing the layer attributes. |+| Layer Attributes ​ | [[Table Type]] ​ | Table of per-layer attributes, keyed by layer position in the map |
  
 ===== Group ===== ===== Group =====
Line 28: Line 28:
 ===== Notes ===== ===== Notes =====
  
-This functor analyzes all map layers. The resulting table refers ​to all of them.+Each attribute has a predefined name that can be used to retrieve it by name (rather than by numeric key) with the ''​tX["​NAME"​]''​ syntax in [[Calculate Map]], [[Calculate Categorical Map]], [[Calculate Value]], and the lookup table calculators.
  
-The functor employs a lookup table with keys to the attributes. Each key has predefined nameThis name can be used to retrieve ​the corresponding attribute in [[Calculate Map]], [[Calculate Categorical Map]], [[Calculate Value]] and [[Calculate Lookup Table]].+If an attribute cannot be determined, its entry is omitted from Attributes rather than being filled ​with a placeholderMinimum and maximum values are only determined when the map has at least one non-null cell.
  
-If it is not possible to determine any of these attributes, the corresponding entry in the lookup table is left blank. It determines the maximum and the minimum values only when there is at least one non null cell on the map. +**Basic attributes**
- +
-==== Basic Attributes ====+
  
 ^ Key  ^ Predefined Name  ^ Description ​ ^ ^ Key  ^ Predefined Name  ^ Description ​ ^
 | 1  | "​lines" ​ | number of lines  | | 1  | "​lines" ​ | number of lines  |
 | 2  | "​columns" ​ | number of columns ​ | | 2  | "​columns" ​ | number of columns ​ |
-| 3  | "​cells" ​ | number of cells (number of lines multiplied by the number of columns |+| 3  | "​cells" ​ | lines times columns ​ |
 | 4  | "​layers" ​ | number of layers ​ | | 4  | "​layers" ​ | number of layers ​ |
-| 5  | "​cellHeight" ​ | cell height ​(in meters | +| 5  | "​cellHeight" ​ | cell heightin meters ​ | 
-| 6  | "​cellWidth" ​ | cell width (in meters | +| 6  | "​cellWidth" ​ | cell widthin meters ​ | 
-| 7  | "​cellArea" ​ | cell area (in hectares | +| 7  | "​cellArea" ​ | cell areain hectares ​ | 
-| 19  | "​cellType"  ​| [[Extract Map Attributes#​Cell Type Codes|cell type code]]  |+| 19  | "​cellType" ​ | cell type code, see Cell type codes below  |
 | 20  | "​nullValue" ​ | null value  | | 20  | "​nullValue" ​ | null value  |
 +| 21  | "​registrationCoordinateY" ​ | registration coordinate Y  |
 +| 22  | "​registrationCoordinateX" ​ | registration coordinate X  |
 +| 23  | "​registrationCellY" ​ | registration cell Y  |
 +| 24  | "​registrationCellX" ​ | registration cell X  |
 +| 25  | "​rotationY" ​ | rotation Y  |
 +| 26  | "​rotationX" ​ | rotation X  |
 +| 27  | "​originalCellHeight" ​ | cell height as specified by the projection ​ |
 +| 28  | "​originalCellWidth" ​ | cell width as specified by the projection ​ |
  
-==== Dynamic attributes ​====+**Dynamic attributes** (present only when Extract Dynamic Attributes is true), computed across all non-null cells of all layers:
  
 ^ 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:
  
 ^ Key  ^ Predefined Name  ^ Description ​ ^ ^ Key  ^ Predefined Name  ^ Description ​ ^
Line 66: Line 72:
 | 18  | "​uniqueCells" ​ | total unique occurrences (excluding null cells) ​ | | 18  | "​uniqueCells" ​ | total unique occurrences (excluding null cells) ​ |
  
-==== Cell Type Codes ====+**Cell type codes** used by attribute 19 ("​cellType"​):​
  
-The codes used to represent all the possible [[cell_type_type|cells types]], corresponding to attribute key 19 ("​cellType"​),​ are listed below: +Code  ^ Cell Type  ^
- +
-Key  ^ Cell Type  ^ +
 | 0  | Unsigned 1 Bit Integer ​ | | 0  | Unsigned 1 Bit Integer ​ |
 | 1  | Signed 8 Bit Integer ​ | | 1  | Signed 8 Bit Integer ​ |
Line 79: Line 83:
 | 6  | Unsigned 32 Bit Integer ​ | | 6  | Unsigned 32 Bit Integer ​ |
 | 7  | IEEE 754 32 Bit Real  | | 7  | IEEE 754 32 Bit Real  |
 +| 8  | IEEE 754 64 Bit Real  |
  
-==== Layer Attributes ​====+Layer Attributes ​has columns "​Layer_Index"​ (the layer'​s position) and "​Layer_Name"​ (the layer'​s name); currently the layer name is the only layer-specific attribute returned.
  
-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  | Real  | The name of the corresponding layer  | 
-  
 ===== Internal Name ===== ===== Internal Name =====
  
 ExtractMapAttributes ExtractMapAttributes
 +
 +===== Usage examples =====
 +
 +See practical examples of this functor in [[lesson_6|Lesson 6: Extracting map attributes and basic statistics]]
 +