Differences

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

Link to this comparison view

categorization_type [2013/08/07 15:35]
admin [Categorization Type]
categorization_type [2013/08/08 03:33]
Line 1: Line 1:
-====== Categorization Type ====== 
- 
-A categorization is a set of categories/​classes used to represent specific features in a [[Categorical Map Type|Categorical Map]]. 
- 
-===== 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]). 
- 
-  * **Converted to**: [[Table Type]]. 
- 
-===== GUI Editor ===== 
- 
-[{{ :​editors:​categorization_editor.png?​nolink&​ |Graphical representation of the categorization editor}}] 
- 
-===== EGO Script ===== 
- 
-A constant representing a set of categories can be defined in a [[EGO Script]] uses the following syntax: 
- 
-<code cpp> 
-[ 
-  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>​ 
- 
-Each line is formed by the following elements: the category value, name and color. 
- 
-The category value is represented by a positive or negative integer. It corresponds to a cell value in a categorical map. Ex: -10, 1, 200 etc 
- 
-The category name is a non-empty string enclosed by double quotes. A name must start with a letter followed by letters, numbers and underscores ('​_'​). Ex: "​forest",​ "​deforestation",​ "​class_1"​ etc 
- 
-The category color is represented by a three element tuple enclosed by parentheses. A color is represented using the [[wp>​RGB_color_model|(R,​ G, B) notation]]. Each one of the tuple elements corresponds to one of the color components. The first element represents the red component, the second component represents the green component and the third and last one represents blue component. Each color component must be in the range [0, 255]. Ex: (255, 0, 0), (128, 128, 128) etc. The color (0, 0, 0) is black and the color (255, 255, 255) is white. 
- 
-Optional commas can be used to separate elements in a categorization. 
- 
-It is worth noting that categories do not need to be contiguous.