:sourcedir: ../../.. ==== PointSymbolizer The point symbolizer draws a given image at a point position. When given a line or polygon as input the shape will be put at the middle of the line or center of the polygon. If no image file is specified a small square is used as the default point image. For putting symbols along a line or the edge of a polygon the MarkerSymbolizer is usually a better choice. .PointSymbolizer Attributes [width="100%",options="header,unbreakable",cols="m,d,d,d"] |==================== | Attribute | Type | Default | Description | <> | file path | none | | <> | string | none | name of a to find the input file in | <> | bool | false | allow to paint over previous symbolizers output | <> | float | 1.0 | | <> | string | cetroid | Wehter to place on a polygons centroid, which can actually be outside, or its interior | ignore-placement | bool | false | | <> | SVG transform | identity | | comp-op | Compositing | src-over | |==================== [#pointsymbolizer-file] ===== `file` attribute `file` refers to a SVG or PNG file to include as a symbol at the point position. The file can be given as a constant string, or as an expression, so files to display can be dynamically chosen from layer data. By default `file` paths are either absolute or relative to the directory the main style file is in, but different directory paths can be set up using the <<_filesource,``>> tag and referenced by its `name` using the <> attribute. .PointSymbolizer file ==== [source,xml] ----- include::{sourcedir}/examples/Symbolizer/Point/file.xml[] ----- image::examples/Symbolizer/Point/file.svg[align="center"] ==== [#pointsymbolizer-opacity] ===== `opacity` attribute The `opacity` attribute defines how opaque or transparant a point symbol should be rendered. The value range is from `0.0` for completely transparent to `1.0` for completely opaque. .PointSymbolizer opacity ==== [source,xml] ----- include::{sourcedir}/examples/Symbolizer/Point/opacity.xml[] ----- image::examples/Symbolizer/Point/opacity.svg[align="center"] ==== [#pointsymbolizer-base] ===== `base` attribute The `base` attribute defines which <<_filesource,``>> should be used as the base directory for a <> symbol. NOTE: The `base` attribute only accepts constant strings, no expressions. So it can only be chosen dynamically by using <<_rule,``>>/<<_filter,``>> constructs. .PointSymbolizer base ==== [source,xml] ----- include::{sourcedir}/examples/Symbolizer/Point/base.xml[] ----- image::examples/Symbolizer/Point/base.svg[align="center"] ==== [#pointsymbolizer-allow-overlap] ===== `allow-overlap` attribute The `allow-overlap` defines whether a point symbolizer may be drawn over previous output. .PointSymbolizer allow-overlap ==== [source,xml] ----- include::{sourcedir}/examples/Symbolizer/Point/allow-overlap.xml[] ----- image::examples/Symbolizer/Point/allow-overlap.svg[align="center"] ==== [#pointsymbolizer-placement] ===== `placement` attribute The `placement` attribute specifies where the point symbol should be placed on a polygon object. By default it is placed on the `centroid` of the polygons, but for a non-convex polygon this can actually place the symbol outside of the polygon itself. `interior` makes sure that the symbol is placed within the polygon in all cases. .PointSymbolizer placement ==== [source,xml] ----- include::{sourcedir}/examples/Symbolizer/Point/placement.xml[] ----- image::examples/Symbolizer/Point/placement.svg[align="center"] ==== [#pointsymbolizer-transform] ===== `transform` attribute TODO: document SVG transformations .PointSymbolizer scaling [#example-pointsymbolizer-scaling] ==== [source,xml] ----- include::{sourcedir}/examples/Symbolizer/Point/transform-scale.xml[] ----- image::examples/Symbolizer/Point/transform-scale.svg[align="center"] ==== .PointSymbolizer rotation [#example-pointsymbolizer-rotation] ==== [source,xml] ----- include::{sourcedir}/examples/Symbolizer/Point/transform-rotate.xml[] ----- image::examples/Symbolizer/Point/transform-rotate.svg[align="center"] ==== [#pointsymbolizer-comp-op] ===== `comp-up` attribute TODO: document SVG compositing .PointSymbolizer compositing ==== TODO ====