Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
categorization_type [2013/08/08 03:33] 127.0.0.1 external edit |
categorization_type [2024/05/02 14:37] (current) chrystian [Automatic Conversions] Added an example of TableType conversion |
||
---|---|---|---|
Line 39: | Line 39: | ||
===== Automatic Conversions ===== | ===== Automatic Conversions ===== | ||
- | * **Converted from**: [[Table Type]]: the table must have columns "*#real" (category value), "#string" (category name), "#real" (category red color in the range [0, 255]), "#real" (category green color in the range [0, 255]) and "#real" (category blue color in the range [0, 255]). | + | [[Table Type]]: |
- | + | ||
- | * **Converted to**: [[Table Type]]. | + | |
+ | Conversions can occur either from Table Type or to Table Type. For this Table type, the structure must contain the following columns: | ||
+ | * "*#real" (category value): Represents the category value. | ||
+ | * "#string" (category name): Represents the category name. | ||
+ | * "#real" (category red color): Represents the category's red color component in the range [0, 255]. | ||
+ | * "#real" (category green color): Represents the category's green color component in the range [0, 255]. | ||
+ | * "#real" (category blue color): Represents the category's blue color component in the range [0, 255]. | ||
+ | See the following example of a CSV table that represent some categories: | ||
+ | <code cpp> | ||
+ | Value*, Name, Color_Red, Color_Green, Color_Blue, | ||
+ | 1, Rondonia, 139, 35, 35, | ||
+ | 2, Acre, 105, 211, 169, | ||
+ | 3, Amazonas, 149, 149, 238, | ||
+ | 4, Roraima, 177, 177, 66, | ||
+ | 5, Para, 238, 203, 149, | ||
+ | 6, Amapa, 62, 12, 96, | ||
+ | 7, Tocantins, 238, 149, 149, | ||
+ | 8, Maranhao, 51, 255, 204, | ||
+ | 9, Mato_Grosso, 211, 105, 211 | ||
+ | </code> |