Feature symbolization: Difference between revisions
(→) |
(→) |
||
| Line 217: | Line 217: | ||
<rotation offset="45.0"/> | <rotation offset="45.0"/> | ||
</point></source> | </point></source> | ||
{| class="wikitable" | {| class="wikitable" | ||
! Child element | ! Child element | ||
Revision as of 14:01, 6 September 2019
Symbols.xml is divided in seven parts contained inside the root element <symbolizations>.
Overall structure of the symbols.xml file:
<symbolization>
<config\>
<constants\>
<colors\>
<points\>
<lines\>
<areas\>
<labels\>
</symbolization>
Symbolization
<symbolization> is the root node of the symbols.xml.
| Child element | Description | Properties |
|---|---|---|
| config | Configuration settings used when building the map style. | O C |
| constants | Constant definitions. | O C A |
| colors | Color definitions. | O C A |
| points | Point symbol definitions. | O C |
| lines | Line symbol definitions. | O C |
| areas | Area symbol definitions. | O C |
| labels | Font characteristics and label rule definitions. | O C |
Config
| Child element | Description | Properties |
|---|---|---|
| yaxisdirection | Defines the direction of the yaxis for symbols/patterns. | O A |
Yaxisdirection
| Attribute | Description | Properties |
|---|---|---|
| value | up (origo in bottom left corner, y axis pointing up) or down (origon in top left corner, y axis pointing down). Default value is up.
|
Constants
| Child element | Description | Properties |
|---|---|---|
| constant | Constant value needed for symbolization. | O R A |
Constant
| Attribute | Description | Properties |
|---|---|---|
| name | String that identifies the constant. | |
| value | The value of the constant. |
Example:
<constants>
<constant name="contour_interval" value="20"/>
</constants>
Colors
The <colors>node contain the color table information. This color table is referenced from the point, line, area and label sections of the symbol.xml file.
| Child element | Description | Properties |
|---|---|---|
| color | Color value definition. | O R A |
Color
| Attribute | Description | Properties |
|---|---|---|
| Name | String that identifies the color. | |
| Rgba | value defining the red, green, blue and alpha values for the color. |
Example:
<colors>
<color name="black" rgba="0,0,0,255"/>
<color name="black12" rgba="224,224,224,255"/>
<color name="cyan" rgba="0,159,218,255"/>
<color name="cyan4" rgba="242,252,252,255"/>
<color name="white" rgba="255,255,255,255"/>
</colors>
Points
The <points> section of the feature symbolization file contains all point symbol definitions.
| Child element | Description | Properties |
|---|---|---|
| Configuration settings for points symbols. | O C | |
| Point symbol definition. | O R C |
Config
Basescale
| Attribute | Description | Properties |
|---|---|---|
| value | Scale factor. Default value is 1.0. |
Defaultroot
| Attribute | Description | Properties |
|---|---|---|
| path | Relative path to where the pointsymbol-files are located. |
Point
The <point> blocks defines point symbols which are used either as a part of a complex line/area symbolization or as a single point map element. Point symbols can be rotated, offset and/or scaled.
Example:
<point>
<sgname>Blue072_Obstruction</sgname>
<origo type="centerx_y" y="0.25"/>
<extent w="2.90" h="3.7"/>
<scale value="0.7"/>
<rotation offset="45.0"/>
</point>
Origo
| Attribute | Description | Properties |
|---|---|---|
| type | How origo is defined. Valid values are: xy, center, centerx_y, x_centery. | |
| x | Origo x coordinate. Mandatory when value of type attribute is x_centery or xy. | |
| y | Origo y coordinate. Mandatory when value of type attribute is centerx_y or xy. |
Extent
| Attribute | Description | Properties |
|---|---|---|
| w | Width of the symbol graphic (in mm). | |
| h | Height of the symbol graphic (in mm). |
Scale
| Attribute | Description | Properties |
|---|---|---|
| value | Scale factor. |
Rotation
| Attribute | Description | Properties |
|---|---|---|
| offset | Rotation offset value in degrees. |
Lines
[[./core_vector_symbolization_lines.html|Details Line Symbolization]]
Areas
[[./core_vector_symbolization_areas.html|Details Area Symbolization]]
Labels
[[./core_vector_symbolization_labels.html|Details Label Symbolization]]