diff --git a/.gitignore b/.gitignore index d62ccf5c2..838054374 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ test/rendering/layers/ test/rendering/cache/ test/rendering-mss/npm-debug.log +docs/_build/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 138752f9c..b347a4023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## Changelog +## 0.18.1 + +* Updated `mapnik-reference` to fix an install problem for some Node.js versions +* Backported documentation updates + ## 0.18.0 * Compile time performance improvement by leaving out rules that do not apply to layer minzoom and maxzoom restrictions if specified ([#469](https://github.com/mapbox/carto/issues/469)) diff --git a/docs-generator/README.md b/docs-generator/README.md deleted file mode 100644 index 3cd22d6e0..000000000 --- a/docs-generator/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Generating CartoCSS docs - -From the `docs-generator/` directory: - -``` -$ npm install -``` - -Then: - -``` -$ node generate.js -``` - -Will save docs to `docs/`. \ No newline at end of file diff --git a/docs-generator/generate.js b/docs-generator/generate.js deleted file mode 100644 index 399437e6f..000000000 --- a/docs-generator/generate.js +++ /dev/null @@ -1,22 +0,0 @@ -var fs = require('fs'), - path = require('path'), - refs = require('mapnik-reference'), - _ = require('lodash'); - -function tmpl(x) { - return _.template(fs.readFileSync(path.join(__dirname, x), 'utf-8')); -} - -var index = tmpl('index._'); -var table = tmpl('symbolizers._'); - - refs.versions.forEach(function (v) { - var ref = refs.load(v); - fs.writeFileSync(path.join(__dirname, '../docs/' + v + '.md'), index({ - symbolizers: ref.symbolizers, - table: table, - version: v, - versions: refs.versions, - _: _ - })); -}); diff --git a/docs-generator/index._ b/docs-generator/index._ deleted file mode 100644 index 73f467e7f..000000000 --- a/docs-generator/index._ +++ /dev/null @@ -1,171 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. -<%= table({symbolizers:symbolizers}) %> - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs-generator/package.json b/docs-generator/package.json deleted file mode 100644 index db3e3ff46..000000000 --- a/docs-generator/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "carto-site", - "private": true, - "version": "0.0.0", - "description": "Mapnik Stylesheet Compiler", - "url": "https://github.com/mapbox/carto", - "repositories": [{ - "type": "git", - "url": "http://github.com/mapbox/carto.git" - }], - "author": { - "name": "MapBox", - "url": "http://mapbox.com/", - "email": "info@mapbox.com" - }, - "dependencies": { - "lodash": "~4.5.1", - "mapnik-reference": "~8.6.1" - } -} diff --git a/docs-generator/symbolizers._ b/docs-generator/symbolizers._ deleted file mode 100644 index f24a52149..000000000 --- a/docs-generator/symbolizers._ +++ /dev/null @@ -1,17 +0,0 @@ -<% _(symbolizers).each(function(symbolizer, name) { %> -<% if (name == '*') { %>## All elements<% } else { %>## <%= name %><% } %> -<% _(symbolizer).filter(function(p) { return p.css; }).each(function(p) { %> -##### <%= p.css.replace(/\s/g, '') %> <% if (_.isArray(p.type)) { %>`keyword`<% } else { %>`<%= p.type %>` <% } %> -<% if (_.has(p, 'status')) { %>Status: *<%= p.status %>* - -<% } %> -<% if (_.isArray(p.type)) { %><% _(p.type).each(function(type) { %>`<%= type %>` <% }); %><% } %> -<% if (p.type === 'functions' && _.isArray(p.functions)) { %><% _(p.functions).each(function(type) { %>`<%= type[0] %>` <% }); %><% } %> - -<% if (typeof p['default-value'] !== '') { %>Default Value: <%= p['default-value'] %><% } %> -<% if (p['default-meaning']) { %>_(<%- p['default-meaning'] %>)_<% } %> -<% if (typeof p['range'] !== 'undefined') { %>Range: <%= '' + p['range'] %><% } %> -<% if (p.doc) { %><%= p.doc%><% } %> -* * * -<% }); %> -<% }); %> diff --git a/docs/2.0.0.md b/docs/2.0.0.md deleted file mode 100644 index e5d23d5a9..000000000 --- a/docs/2.0.0.md +++ /dev/null @@ -1,1404 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## map - -##### background-color `color` - - - - -Default Value: none -_(transparent)_ - -Map Background color -* * * - -##### background-image `uri` - - - - -Default Value: -_(transparent)_ - -An image that is repeated below all features on a map as a background. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_ - -Map spatial reference (proj4 string) -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: rgba(128,128,128,1) -_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_ - -Fill color to assign to a polygon -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon edges -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the polygon -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Amount of smoothing applied -* * * - - -## line - -##### line-color `color` - - - - -Default Value: rgba(0,0,0,1) -_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_ - -The color of a drawn line -* * * - -##### line-width `float` - - - - -Default Value: 1 - - -The width of a line in pixels -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### line-join `keyword` - -`miter` `round` `bevel` - - -Default Value: miter - - -The behavior of lines when joining -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt - - -The display of line endings -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of stroke line -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(solid line)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(solid line)_ - -valid parameter but not currently used in renderers -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: -_(An ellipse or circle, if width equals height)_ - -An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The overall opacity of the marker -* * * - -##### marker-line-color `color` - - - - -Default Value: black - - -The color of the stroke around a marker shape. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 - - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### marker-placement `keyword` - -`point` `line` - - -Default Value: line - - -Attempt to place markers on a point once or on a line repeatedly -* * * - -##### marker-type `keyword` - -`arrow` `ellipse` - - -Default Value: ellipse - - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) -* * * - -##### marker-width `float` - - - - -Default Value: 10 - - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 - - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue - - -The color of the area of the marker. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 - - -Space between repeated labels -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 - - -The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. -* * * - -##### marker-transform `string` - - - - -Default Value: -_(no transformation)_ - -An SVG transformation definition -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: - - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] -* * * - -##### shield-face-name `string` - - - - -Default Value: - - -Font name and style to use for the shield text -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image -* * * - -##### shield-size `float` - - - - -Default Value: 10 - - -The size of the shield text in pixels -* * * - -##### shield-fill `color` - - - - -Default Value: black - - -The color of the shield text -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 - - -Minimum distance to the next shield symbol, not necessarily the same shield. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 - - -The spacing between repeated occurrences of the same shield on a line -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a shield gets relative to other shields -* * * - -##### shield-wrap-width `float` - - - - -Default Value: 0 - - -Length before wrapping long names. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### shield-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing between lines of multiline labels (in pixels) -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-dx `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-dy `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the image used for the shield -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the text placed on top of the shield -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: middle - - -The shield's horizontal alignment from its centerpoint -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### shield-no-text `boolean` - - - - -Default Value: false - - -Whether the shield should make room for a text label. -* * * - -##### shield-justify-alignment `string` - - - - -Default Value: middle - - -Define how text in a shield's label is justified -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon -* * * - -##### polygon-pattern-alignment `keyword` - -`local` `global` - - -Default Value: local - - -Specify whether to align pattern fills to the layer or to the map. -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-mode `keyword` - -`normal` `grain_merge` `grain_merge2` `multiply` `multiply2` `divide` `divide2` `screen` `hard_light` - - -Default Value: normal - - -The blending technique used to overlay this raster image on the layer below. Normal simply covers the layer. Grain merge adds the two layers together and subtracts 128 from the value, making the resulting area sometimes high-contrast. Screen often gives a lighter, washed-out appearance. Multiply multiplies the pixels, giving a high-contrast result. Divide divides the upper layer by the lower layer, making a lighter version. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`fast` `bilinear` `bilinear8` `bicubic` `spline16` `gaussian` `lanczos` - - -Default Value: fast - - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `integer` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none - - -Image file to represent a point -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A value from 0 to 1 to control the opacity of the point -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid - - -How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `string` - - - - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - - -## text - -##### text-name `string` - - - - -Default Value: - - -Value to use for a text label. Data columns are specified using brackets like [column_name] -* * * - -##### text-face-name `string` - - - - -Default Value: - - -Font name and style to render a label in -* * * - -##### text-size `float` - - - - -Default Value: 10 - - -Text size in pixels -* * * - -##### text-ratio `float` - - - - -Default Value: 0 - - -Define the amount of text (of the total) present on successive lines when wrapping occurs -* * * - -##### text-wrap-width `float` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### text-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long text. -* * * - -##### text-spacing `float` - - - - -Default Value: 0 - - -Distance between repeated text labels on a line -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing adjustment between characters in pixels -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing adjustment between lines in pixels -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: 0 - - -Allows the label to be displaced from its ideal position by a number of pixels -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: none - - -If present, the maximum angle change, in degrees, allowed between adjacent characters in a label. This will stop label placement around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: #000000 - - -Specifies the color for the text -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A number from 0 to 1 specifying the opacity for the text -* * * - -##### text-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### text-dx `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### text-dy `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` - - -Default Value: middle -_(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### text-min-distance `float` - - - - -Default Value: 0 - - -Minimum permitted distance to the next text symbolizer. -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a text symbolizer gets relative to other text -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all paths)_ - -Place labels only on paths longer than this value. -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 - - -Rotate the text. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -Control the style of placement of a point versus the geometry it is attached to. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` - - -Default Value: dummy - - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. See TextSymbolizer docs for format. -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: middle - - -The text's horizontal alignment from its centerpoint -* * * - -##### text-align `keyword` - -`left` `right` `center` - - -Default Value: center - - -Set the text alignment. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: #FFFFFF - - -The color of the buildings walls. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 - - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 - - -The height of the building in pixels. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/2.0.1.md b/docs/2.0.1.md deleted file mode 100644 index e5d23d5a9..000000000 --- a/docs/2.0.1.md +++ /dev/null @@ -1,1404 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## map - -##### background-color `color` - - - - -Default Value: none -_(transparent)_ - -Map Background color -* * * - -##### background-image `uri` - - - - -Default Value: -_(transparent)_ - -An image that is repeated below all features on a map as a background. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_ - -Map spatial reference (proj4 string) -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: rgba(128,128,128,1) -_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_ - -Fill color to assign to a polygon -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon edges -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the polygon -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Amount of smoothing applied -* * * - - -## line - -##### line-color `color` - - - - -Default Value: rgba(0,0,0,1) -_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_ - -The color of a drawn line -* * * - -##### line-width `float` - - - - -Default Value: 1 - - -The width of a line in pixels -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### line-join `keyword` - -`miter` `round` `bevel` - - -Default Value: miter - - -The behavior of lines when joining -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt - - -The display of line endings -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of stroke line -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(solid line)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(solid line)_ - -valid parameter but not currently used in renderers -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: -_(An ellipse or circle, if width equals height)_ - -An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The overall opacity of the marker -* * * - -##### marker-line-color `color` - - - - -Default Value: black - - -The color of the stroke around a marker shape. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 - - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### marker-placement `keyword` - -`point` `line` - - -Default Value: line - - -Attempt to place markers on a point once or on a line repeatedly -* * * - -##### marker-type `keyword` - -`arrow` `ellipse` - - -Default Value: ellipse - - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) -* * * - -##### marker-width `float` - - - - -Default Value: 10 - - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 - - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue - - -The color of the area of the marker. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 - - -Space between repeated labels -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 - - -The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. -* * * - -##### marker-transform `string` - - - - -Default Value: -_(no transformation)_ - -An SVG transformation definition -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: - - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] -* * * - -##### shield-face-name `string` - - - - -Default Value: - - -Font name and style to use for the shield text -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image -* * * - -##### shield-size `float` - - - - -Default Value: 10 - - -The size of the shield text in pixels -* * * - -##### shield-fill `color` - - - - -Default Value: black - - -The color of the shield text -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 - - -Minimum distance to the next shield symbol, not necessarily the same shield. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 - - -The spacing between repeated occurrences of the same shield on a line -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a shield gets relative to other shields -* * * - -##### shield-wrap-width `float` - - - - -Default Value: 0 - - -Length before wrapping long names. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### shield-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing between lines of multiline labels (in pixels) -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-dx `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-dy `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the image used for the shield -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the text placed on top of the shield -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: middle - - -The shield's horizontal alignment from its centerpoint -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### shield-no-text `boolean` - - - - -Default Value: false - - -Whether the shield should make room for a text label. -* * * - -##### shield-justify-alignment `string` - - - - -Default Value: middle - - -Define how text in a shield's label is justified -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon -* * * - -##### polygon-pattern-alignment `keyword` - -`local` `global` - - -Default Value: local - - -Specify whether to align pattern fills to the layer or to the map. -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-mode `keyword` - -`normal` `grain_merge` `grain_merge2` `multiply` `multiply2` `divide` `divide2` `screen` `hard_light` - - -Default Value: normal - - -The blending technique used to overlay this raster image on the layer below. Normal simply covers the layer. Grain merge adds the two layers together and subtracts 128 from the value, making the resulting area sometimes high-contrast. Screen often gives a lighter, washed-out appearance. Multiply multiplies the pixels, giving a high-contrast result. Divide divides the upper layer by the lower layer, making a lighter version. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`fast` `bilinear` `bilinear8` `bicubic` `spline16` `gaussian` `lanczos` - - -Default Value: fast - - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `integer` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none - - -Image file to represent a point -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A value from 0 to 1 to control the opacity of the point -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid - - -How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `string` - - - - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - - -## text - -##### text-name `string` - - - - -Default Value: - - -Value to use for a text label. Data columns are specified using brackets like [column_name] -* * * - -##### text-face-name `string` - - - - -Default Value: - - -Font name and style to render a label in -* * * - -##### text-size `float` - - - - -Default Value: 10 - - -Text size in pixels -* * * - -##### text-ratio `float` - - - - -Default Value: 0 - - -Define the amount of text (of the total) present on successive lines when wrapping occurs -* * * - -##### text-wrap-width `float` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### text-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long text. -* * * - -##### text-spacing `float` - - - - -Default Value: 0 - - -Distance between repeated text labels on a line -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing adjustment between characters in pixels -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing adjustment between lines in pixels -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: 0 - - -Allows the label to be displaced from its ideal position by a number of pixels -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: none - - -If present, the maximum angle change, in degrees, allowed between adjacent characters in a label. This will stop label placement around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: #000000 - - -Specifies the color for the text -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A number from 0 to 1 specifying the opacity for the text -* * * - -##### text-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### text-dx `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### text-dy `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` - - -Default Value: middle -_(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### text-min-distance `float` - - - - -Default Value: 0 - - -Minimum permitted distance to the next text symbolizer. -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a text symbolizer gets relative to other text -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all paths)_ - -Place labels only on paths longer than this value. -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 - - -Rotate the text. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -Control the style of placement of a point versus the geometry it is attached to. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` - - -Default Value: dummy - - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. See TextSymbolizer docs for format. -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: middle - - -The text's horizontal alignment from its centerpoint -* * * - -##### text-align `keyword` - -`left` `right` `center` - - -Default Value: center - - -Set the text alignment. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: #FFFFFF - - -The color of the buildings walls. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 - - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 - - -The height of the building in pixels. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/2.0.2.md b/docs/2.0.2.md deleted file mode 100644 index e5d23d5a9..000000000 --- a/docs/2.0.2.md +++ /dev/null @@ -1,1404 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## map - -##### background-color `color` - - - - -Default Value: none -_(transparent)_ - -Map Background color -* * * - -##### background-image `uri` - - - - -Default Value: -_(transparent)_ - -An image that is repeated below all features on a map as a background. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_ - -Map spatial reference (proj4 string) -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: rgba(128,128,128,1) -_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_ - -Fill color to assign to a polygon -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon edges -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the polygon -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Amount of smoothing applied -* * * - - -## line - -##### line-color `color` - - - - -Default Value: rgba(0,0,0,1) -_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_ - -The color of a drawn line -* * * - -##### line-width `float` - - - - -Default Value: 1 - - -The width of a line in pixels -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### line-join `keyword` - -`miter` `round` `bevel` - - -Default Value: miter - - -The behavior of lines when joining -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt - - -The display of line endings -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of stroke line -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(solid line)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(solid line)_ - -valid parameter but not currently used in renderers -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: -_(An ellipse or circle, if width equals height)_ - -An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The overall opacity of the marker -* * * - -##### marker-line-color `color` - - - - -Default Value: black - - -The color of the stroke around a marker shape. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 - - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### marker-placement `keyword` - -`point` `line` - - -Default Value: line - - -Attempt to place markers on a point once or on a line repeatedly -* * * - -##### marker-type `keyword` - -`arrow` `ellipse` - - -Default Value: ellipse - - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) -* * * - -##### marker-width `float` - - - - -Default Value: 10 - - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 - - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue - - -The color of the area of the marker. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 - - -Space between repeated labels -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 - - -The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. -* * * - -##### marker-transform `string` - - - - -Default Value: -_(no transformation)_ - -An SVG transformation definition -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: - - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] -* * * - -##### shield-face-name `string` - - - - -Default Value: - - -Font name and style to use for the shield text -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image -* * * - -##### shield-size `float` - - - - -Default Value: 10 - - -The size of the shield text in pixels -* * * - -##### shield-fill `color` - - - - -Default Value: black - - -The color of the shield text -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 - - -Minimum distance to the next shield symbol, not necessarily the same shield. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 - - -The spacing between repeated occurrences of the same shield on a line -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a shield gets relative to other shields -* * * - -##### shield-wrap-width `float` - - - - -Default Value: 0 - - -Length before wrapping long names. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### shield-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing between lines of multiline labels (in pixels) -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-dx `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-dy `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the image used for the shield -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the text placed on top of the shield -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: middle - - -The shield's horizontal alignment from its centerpoint -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### shield-no-text `boolean` - - - - -Default Value: false - - -Whether the shield should make room for a text label. -* * * - -##### shield-justify-alignment `string` - - - - -Default Value: middle - - -Define how text in a shield's label is justified -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon -* * * - -##### polygon-pattern-alignment `keyword` - -`local` `global` - - -Default Value: local - - -Specify whether to align pattern fills to the layer or to the map. -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-mode `keyword` - -`normal` `grain_merge` `grain_merge2` `multiply` `multiply2` `divide` `divide2` `screen` `hard_light` - - -Default Value: normal - - -The blending technique used to overlay this raster image on the layer below. Normal simply covers the layer. Grain merge adds the two layers together and subtracts 128 from the value, making the resulting area sometimes high-contrast. Screen often gives a lighter, washed-out appearance. Multiply multiplies the pixels, giving a high-contrast result. Divide divides the upper layer by the lower layer, making a lighter version. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`fast` `bilinear` `bilinear8` `bicubic` `spline16` `gaussian` `lanczos` - - -Default Value: fast - - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `integer` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none - - -Image file to represent a point -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A value from 0 to 1 to control the opacity of the point -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid - - -How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `string` - - - - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - - -## text - -##### text-name `string` - - - - -Default Value: - - -Value to use for a text label. Data columns are specified using brackets like [column_name] -* * * - -##### text-face-name `string` - - - - -Default Value: - - -Font name and style to render a label in -* * * - -##### text-size `float` - - - - -Default Value: 10 - - -Text size in pixels -* * * - -##### text-ratio `float` - - - - -Default Value: 0 - - -Define the amount of text (of the total) present on successive lines when wrapping occurs -* * * - -##### text-wrap-width `float` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### text-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long text. -* * * - -##### text-spacing `float` - - - - -Default Value: 0 - - -Distance between repeated text labels on a line -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing adjustment between characters in pixels -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing adjustment between lines in pixels -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: 0 - - -Allows the label to be displaced from its ideal position by a number of pixels -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: none - - -If present, the maximum angle change, in degrees, allowed between adjacent characters in a label. This will stop label placement around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: #000000 - - -Specifies the color for the text -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A number from 0 to 1 specifying the opacity for the text -* * * - -##### text-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### text-dx `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### text-dy `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` - - -Default Value: middle -_(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### text-min-distance `float` - - - - -Default Value: 0 - - -Minimum permitted distance to the next text symbolizer. -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a text symbolizer gets relative to other text -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all paths)_ - -Place labels only on paths longer than this value. -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 - - -Rotate the text. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -Control the style of placement of a point versus the geometry it is attached to. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` - - -Default Value: dummy - - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. See TextSymbolizer docs for format. -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: middle - - -The text's horizontal alignment from its centerpoint -* * * - -##### text-align `keyword` - -`left` `right` `center` - - -Default Value: center - - -Set the text alignment. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: #FFFFFF - - -The color of the buildings walls. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 - - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 - - -The height of the building in pixels. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/2.1.0.md b/docs/2.1.0.md deleted file mode 100644 index e0b33a971..000000000 --- a/docs/2.1.0.md +++ /dev/null @@ -1,1803 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` - -Default Value: none -_(no filters)_ - -A list of image filters. -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current layer on top of other layers)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(no separate buffer will be used and no alpha will be applied to the style after rendering)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer) -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(transparent)_ - -Map Background color -* * * - -##### background-image `uri` - - - - -Default Value: -_(transparent)_ - -An image that is repeated below all features on a map as a background. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_ - -Map spatial reference (proj4 string) -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: rgba(128,128,128,1) -_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_ - -Fill color to assign to a polygon -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the polygon -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon edges -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h -* * * - -##### polygon-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: rgba(0,0,0,1) -_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_ - -The color of a drawn line -* * * - -##### line-width `float` - - - - -Default Value: 1 - - -The width of a line in pixels -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### line-join `keyword` - -`miter` `round` `bevel` - - -Default Value: miter - - -The behavior of lines when joining -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt - - -The display of line endings -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of stroke line -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(solid line)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(solid line)_ - -valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled) -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` - - - - -Default Value: 0 -_(no offset)_ - -Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: -_(An ellipse or circle, if width equals height)_ - -An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity will be used)_ - -The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The fill opacity of the marker -* * * - -##### marker-line-color `color` - - - - -Default Value: black - - -The color of the stroke around a marker shape. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 - - -The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior -* * * - -##### marker-type `keyword` - -`arrow` `ellipse` - - -Default Value: ellipse - - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) -* * * - -##### marker-width `float` - - - - -Default Value: 10 - - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 - - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue - - -The color of the area of the marker. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 - - -Space between repeated labels -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 - - -The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - -##### marker-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: - - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text -* * * - -##### shield-face-name `string` - - - - -Default Value: - - -Font name and style to use for the shield text -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image -* * * - -##### shield-size `float` - - - - -Default Value: 10 - - -The size of the shield text in pixels -* * * - -##### shield-fill `color` - - - - -Default Value: black - - -The color of the shield text -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 - - -Minimum distance to the next shield symbol, not necessarily the same shield. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 - - -The spacing between repeated occurrences of the same shield on a line -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a shield gets relative to other shields -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 - - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing between lines of multiline labels (in pixels) -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-dx `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-dy `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the image used for the shield -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the text placed on top of the shield -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The shield's horizontal alignment from its centerpoint -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle - - -The shield's vertical alignment from its centerpoint -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto - - -Define how text in a shield's label is justified -* * * - -##### shield-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon -* * * - -##### polygon-pattern-alignment `keyword` - -`local` `global` - - -Default Value: local - - -Specify whether to align pattern fills to the layer or to the map. -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications)_ - -(Default 1.0) - Apply an opacity level to the image used for the pattern -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bilinear8` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near - - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none - - -Image file to represent a point -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A value from 0 to 1 to control the opacity of the point -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid - - -How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `string` - - - - -Default Value: - - -Value to use for a text label. Data columns are specified using brackets like [column_name] -* * * - -##### text-face-name `string` - - - - -Default Value: - - -Font name and style to render a label in -* * * - -##### text-size `float` - - - - -Default Value: 10 - - -Text size in pixels -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 - - -Define the amount of text (of the total) present on successive lines when wrapping occurs -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### text-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long text. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 - - -Distance between repeated text labels on a line (aka. label-spacing) -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing adjustment between characters in pixels -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing adjustment between lines in pixels -* * * - -##### text-label-position-tolerance `unsigned` - - - - -Default Value: 0 - - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line) -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 - - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: #000000 - - -Specifies the color for the text -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A number from 0 to 1 specifying the opacity for the text -* * * - -##### text-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### text-dx `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### text-dy `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### text-min-distance `float` - - - - -Default Value: 0 - - -Minimum permitted distance to the next text symbolizer. -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a text symbolizer gets relative to other text -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all paths)_ - -Place labels only on paths longer than this value. -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 - - -Rotate the text. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -Control the style of placement of a point versus the geometry it is attached to. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy - - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The text's horizontal alignment from its centerpoint -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives)_ - -Define how text is justified -* * * - -##### text-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: #FFFFFF - - -The color of the buildings walls. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 - - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 - - -The height of the building in pixels. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/2.1.1.md b/docs/2.1.1.md deleted file mode 100644 index 65372b09b..000000000 --- a/docs/2.1.1.md +++ /dev/null @@ -1,1814 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` - -Default Value: none -_(no filters)_ - -A list of image filters. -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current layer on top of other layers)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(no separate buffer will be used and no alpha will be applied to the style after rendering)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer) -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(transparent)_ - -Map Background color -* * * - -##### background-image `uri` - - - - -Default Value: -_(transparent)_ - -An image that is repeated below all features on a map as a background. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_ - -Map spatial reference (proj4 string) -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: rgba(128,128,128,1) -_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_ - -Fill color to assign to a polygon -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the polygon -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon edges -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h -* * * - -##### polygon-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: rgba(0,0,0,1) -_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_ - -The color of a drawn line -* * * - -##### line-width `float` - - - - -Default Value: 1 - - -The width of a line in pixels -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### line-join `keyword` - -`miter` `round` `bevel` - - -Default Value: miter - - -The behavior of lines when joining -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt - - -The display of line endings -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of stroke line -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(solid line)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(solid line)_ - -valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled) -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` - - - - -Default Value: 0 -_(no offset)_ - -Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: -_(An ellipse or circle, if width equals height)_ - -An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity will be used)_ - -The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The fill opacity of the marker -* * * - -##### marker-line-color `color` - - - - -Default Value: black - - -The color of the stroke around a marker shape. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 - - -The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior -* * * - -##### marker-multi-policy `keyword` - -`each` `whole` `largest` - - -Default Value: each -_(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each)_ - -A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). -* * * - -##### marker-type `keyword` - -`arrow` `ellipse` - - -Default Value: ellipse - - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) -* * * - -##### marker-width `expression` - - - - -Default Value: 10 - - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `expression` - - - - -Default Value: 10 - - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue - - -The color of the area of the marker. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 - - -Space between repeated labels -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 - - -The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - -##### marker-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## shield - -##### shield-name `expression` - - - - -Default Value: - - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text -* * * - -##### shield-face-name `string` - - - - -Default Value: - - -Font name and style to use for the shield text -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image -* * * - -##### shield-size `float` - - - - -Default Value: 10 - - -The size of the shield text in pixels -* * * - -##### shield-fill `color` - - - - -Default Value: black - - -The color of the shield text -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 - - -Minimum distance to the next shield symbol, not necessarily the same shield. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 - - -The spacing between repeated occurrences of the same shield on a line -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a shield gets relative to other shields -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 - - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing between lines of multiline labels (in pixels) -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-dx `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-dy `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the image used for the shield -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 - - -(Default 1.0) - opacity of the text placed on top of the shield -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The shield's horizontal alignment from its centerpoint -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle - - -The shield's vertical alignment from its centerpoint -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto - - -Define how text in a shield's label is justified -* * * - -##### shield-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon -* * * - -##### polygon-pattern-alignment `keyword` - -`local` `global` - - -Default Value: local - - -Specify whether to align pattern fills to the layer or to the map. -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications)_ - -(Default 1.0) - Apply an opacity level to the image used for the pattern -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bilinear8` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near - - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none - - -Image file to represent a point -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A value from 0 to 1 to control the opacity of the point -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid - - -How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `expression` - - - - -Default Value: - - -Value to use for a text label. Data columns are specified using brackets like [column_name] -* * * - -##### text-face-name `string` - - - - -Default Value: - - -Font name and style to render a label in -* * * - -##### text-size `float` - - - - -Default Value: 10 - - -Text size in pixels -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 - - -Define the amount of text (of the total) present on successive lines when wrapping occurs -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### text-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long text. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 - - -Distance between repeated text labels on a line (aka. label-spacing) -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing adjustment between characters in pixels -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing adjustment between lines in pixels -* * * - -##### text-label-position-tolerance `unsigned` - - - - -Default Value: 0 - - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line) -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 - - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: #000000 - - -Specifies the color for the text -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A number from 0 to 1 specifying the opacity for the text -* * * - -##### text-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### text-dx `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### text-dy `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false - - -Tell positioning algorithm to avoid labeling near intersection edges. -* * * - -##### text-min-distance `float` - - - - -Default Value: 0 - - -Minimum permitted distance to the next text symbolizer. -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 - - -Determines the minimum amount of padding that a text symbolizer gets relative to other text -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all paths)_ - -Place labels only on paths longer than this value. -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `expression` - - - - -Default Value: 0 - - -Rotate the text. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -Control the style of placement of a point versus the geometry it is attached to. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy - - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The text's horizontal alignment from its centerpoint -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives)_ - -Define how text is justified -* * * - -##### text-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: #FFFFFF - - -The color of the buildings walls. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 - - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `expression` - - - - -Default Value: 0 - - -The height of the building in pixels. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/2.2.0.md b/docs/2.2.0.md deleted file mode 100644 index 00d69fef0..000000000 --- a/docs/2.2.0.md +++ /dev/null @@ -1,2015 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `colorize-alpha` - -Default Value: none -_(no filters)_ - -A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more more `image-filters` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all `image-filters` have been applied. See `direct-image-filters` if you want to apply a filter directly to the main canvas. -* * * - -##### direct-image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `colorize-alpha` - -Default Value: none -_(no filters)_ - -A list of image filters to apply to the main canvas (see the `image-filters` doc for how they work on a separate canvas) -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current layer on top of other layers)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(no separate buffer will be used and no alpha will be applied to the style after rendering)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer) -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(transparent)_ - -Map Background color -* * * - -##### background-image `uri` - - - - -Default Value: -_(transparent)_ - -An image that is repeated below all features on a map as a background. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_ - -Map spatial reference (proj4 string) -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: rgba(128,128,128,1) -_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_ - -Fill color to assign to a polygon -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the polygon -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon edges -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h -* * * - -##### polygon-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -geometries are simplified by the given tolerance -* * * - -##### polygon-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will not be simplified using the radial distance algorithm)_ - -geometries are simplified by the given algorithm -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: rgba(0,0,0,1) -_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_ - -The color of a drawn line -* * * - -##### line-width `float` - - - - -Default Value: 1 - - -The width of a line in pixels -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### line-join `keyword` - -`miter` `round` `bevel` - - -Default Value: miter - - -The behavior of lines when joining -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt - - -The display of line endings -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of stroke line -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(solid line)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(solid line)_ - -valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled) -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -geometries are simplified by the given tolerance -* * * - -##### line-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will not be simplified using the radial distance algorithm)_ - -geometries are simplified by the given algorithm -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` - - - - -Default Value: 0 -_(no offset)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: -_(An ellipse or circle, if width equals height)_ - -An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity will be used)_ - -The overall opacity of the marker, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The fill opacity of the marker -* * * - -##### marker-line-color `color` - - - - -Default Value: black - - -The color of the stroke around a marker shape. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 - - -The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior -* * * - -##### marker-multi-policy `keyword` - -`each` `whole` `largest` - - -Default Value: each -_(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each)_ - -A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). -* * * - -##### marker-type `keyword` - -`arrow` `ellipse` - - -Default Value: ellipse - - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) -* * * - -##### marker-width `float` - - - - -Default Value: 10 - - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 - - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue - - -The color of the area of the marker. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 - - -Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 - - -The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - -##### marker-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: - - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text -* * * - -##### shield-face-name `string` - - - - -Default Value: - - -Font name and style to use for the shield text -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image -* * * - -##### shield-size `float` - - - - -Default Value: 10 - - -The size of the shield text in pixels -* * * - -##### shield-fill `color` - - - - -Default Value: black - - -The color of the shield text -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false - - -Avoid placing shields that intersect with tile boundaries. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 - - -Minimum distance to the next shield symbol, not necessarily the same shield. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 - - -The spacing between repeated occurrences of the same shield on a line -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 - - -Minimum distance a shield will be placed from the edge of a metatile. -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 - - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing between lines of multiline labels (in pixels) -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-dx `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### shield-dy `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 - - -The opacity of the image used for the shield -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 - - -The opacity of the text placed on top of the shield -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The shield's horizontal alignment from its centerpoint -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle - - -The shield's vertical alignment from its centerpoint -* * * - -##### shield-placement-type `keyword` - -`dummy` `simple` - - -Default Value: dummy - - -Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. -* * * - -##### shield-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `shield-placements: "E,NE,SE,W,NW,SW";` -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto - - -Define how text in a shield's label is justified -* * * - -##### shield-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - -##### shield-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -geometries are simplified by the given tolerance -* * * - -##### line-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will not be simplified using the radial distance algorithm)_ - -geometries are simplified by the given algorithm -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon -* * * - -##### polygon-pattern-alignment `keyword` - -`local` `global` - - -Default Value: local - - -Specify whether to align pattern fills to the layer or to the map. -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications)_ - -Apply an opacity level to the image used for the pattern -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -geometries are simplified by the given tolerance -* * * - -##### polygon-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will not be simplified using the radial distance algorithm)_ - -geometries are simplified by the given algorithm -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bilinear8` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near - - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### raster-colorizer-default-mode `keyword` - -`discrete` `linear` `exact` - - -Default Value: linear -_(A linear interpolation is used to generate colors between the two nearest stops.)_ - -This can be either `discrete`, `linear` or `exact`. If it is not specified then the default is `linear`. -* * * - -##### raster-colorizer-default-color `color` - - - - -Default Value: transparent -_(Pixels that are not colored by the colorizer stops will be transparent)_ - -This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent -* * * - -##### raster-colorizer-epsilon `float` - - - - -Default Value: 1.1920928955078125e-07 -_(Pixels must very closely match the stop filter otherwise they will not be colored.)_ - -This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. -* * * - -##### raster-colorizer-stops `tags` - - - - -Default Value: -_(No colorization will happen without supplying stops.)_ - -Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like `stop(100,#fff,exact)`. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none - - -Image file to represent a point -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -value to control whether the placement of the feature will prevent the placement of other features -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A value from 0 to 1 to control the opacity of the point -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid - - -How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation)_ - -SVG transformation definition -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `string` - - - - -Default Value: - - -Value to use for a text label. Data columns are specified using brackets like [column_name] -* * * - -##### text-face-name `string` - - - - -Default Value: - - -Font name and style to render a label in -* * * - -##### text-size `float` - - - - -Default Value: 10 - - -Text size in pixels -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 - - -Define the amount of text (of the total) present on successive lines when wrapping occurs -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in characters before wrapping text -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### text-wrap-character `string` - - - - -Default Value: - - -Use this character instead of a space to wrap long text. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 - - -Distance between repeated text labels on a line (aka. label-spacing) -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing adjustment between characters in pixels -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing adjustment between lines in pixels -* * * - -##### text-label-position-tolerance `unsigned` - - - - -Default Value: 0 - - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line) -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 - - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: #000000 - - -Specifies the color for the text -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A number from 0 to 1 specifying the opacity for the text -* * * - -##### text-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### text-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### text-dx `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right -* * * - -##### text-dy `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false - - -Avoid placing labels that intersect with tile boundaries. -* * * - -##### text-min-distance `float` - - - - -Default Value: 0 - - -Minimum permitted distance to the next text symbolizer. -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 - - -Minimum distance a text label will be placed from the edge of a metatile. -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all paths)_ - -Place labels only on paths longer than this value. -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 - - -Rotate the text. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -Control the style of placement of a point versus the geometry it is attached to. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` - - -Default Value: dummy - - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The text's horizontal alignment from its centerpoint -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives)_ - -Define how text is justified -* * * - -##### text-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: #FFFFFF - - -The color of the buildings walls. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 - - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 - - -The height of the building in pixels. -* * * - - -## debug - -##### debug-mode `string` - - - - -Default Value: collision - - -The mode for debug rendering -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/2.3.0.md b/docs/2.3.0.md deleted file mode 100644 index 37bb44112..000000000 --- a/docs/2.3.0.md +++ /dev/null @@ -1,2070 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters)_ - -A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more more `image-filters` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all `image-filters` have been applied. See `direct-image-filters` if you want to apply a filter directly to the main canvas. -* * * - -##### image-filters-inflate `boolean` - - - - -Default Value: false -_(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary)_ - -A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). -* * * - -##### direct-image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters)_ - -A list of image filters to apply to the main canvas (see the `image-filters` doc for how they work on a separate canvas). -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current layer on top of other layers)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(no separate buffer will be used and no alpha will be applied to the style after rendering)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(transparent)_ - -Map Background color. -* * * - -##### background-image `uri` - - - - -Default Value: -_(transparent)_ - -An image that is repeated below all features on a map as a background. Accepted formats: JPG, PNG. -* * * - -##### background-image-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(The background-image will be blended with the background normally (placed on top of any existing background-color))_ - -Set the compositing operation used to blend the image into the background. -* * * - -##### background-image-opacity `float` - - - - -Default Value: 1 -_(The image opacity will not be changed when applied to the map background)_ - -Set the opacity of the image. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)_ - -Map spatial reference (proj4 string). -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: rgba(128,128,128,1) -_(gray and fully opaque (alpha = 1), same as rgb(128,128,128))_ - -Fill color to assign to a polygon. -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the polygon. -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon edges. -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### polygon-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -Geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -Simplify geometries by the given tolerance. -* * * - -##### polygon-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will be simplified using the radial distance algorithm)_ - -Simplify gemoetries by the given algorithm. -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: rgba(0,0,0,1) -_(black and fully opaque (alpha = 1), same as rgb(0,0,0))_ - -The color of a drawn line. -* * * - -##### line-width `float` - - - - -Default Value: 1 - - -The width of a line in pixels. -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of a line. -* * * - -##### line-join `keyword` - -`miter` `round` `bevel` - - -Default Value: miter - - -The behavior of lines when joining. -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt - - -The display of line endings. -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of stroke line. -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(solid line)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(solid line)_ - -Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -Geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -Simplify gemoetries by the given tolerance -* * * - -##### line-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will be simplified using the radial distance algorithm)_ - -Simplify gemoetries by the given algorithm. -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` - - - - -Default Value: 0 -_(no offset)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: none -_(An ellipse or circle, if width equals height.)_ - -A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: SVG, JPG, PNG. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity of the marker.)_ - -The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The fill opacity of the marker. -* * * - -##### marker-line-color `color` - - - - -Default Value: black - - -The color of the stroke around the marker. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 - - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the line. -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. -* * * - -##### marker-multi-policy `keyword` - -`each` `whole` `largest` - - -Default Value: each -_(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each)_ - -A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). -* * * - -##### marker-type `keyword` - -`arrow` `ellipse` - - -Default Value: ellipse - - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). -* * * - -##### marker-width `float` - - - - -Default Value: 10 - - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 - - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue - - -The color of the area of the marker. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow makers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -Value to control whether the placement of the feature will prevent the placement of other features. -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 - - -Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 - - -The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation)_ - -SVG transformation definition. -* * * - -##### marker-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: - - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text. Accepted formats: SVG, JPG, PNG. -* * * - -##### shield-face-name `string` - - - - -Default Value: - - -Font name and style to use for the shield text -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image -* * * - -##### shield-size `float` - - - - -Default Value: 10 - - -The size of the shield text in pixels. -* * * - -##### shield-fill `color` - - - - -Default Value: black - - -The color of the shield text. -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false - - -Avoid placing shields that intersect with tile boundaries. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 - - -Minimum distance to the next shield symbol, not necessarily the same shield. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 - - -The spacing between repeated occurrences of the same shield on a line. -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 - - -Minimum distance a shield will be placed from the edge of a metatile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the metatile. -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: " " - - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels. -* * * - -##### shield-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 - - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing between lines of multiline labels (in pixels). -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 - - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. -* * * - -##### shield-dx `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. -* * * - -##### shield-dy `float` - - - - -Default Value: 0 - - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 - - -The opacity of the image used for the shield -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 - - -The opacity of the text placed on top of the shield -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The shield's horizontal alignment from its centerpoint -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle - - -The shield's vertical alignment from its centerpoint -* * * - -##### shield-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy - - -Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. -* * * - -##### shield-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `shield-placements: "E,NE,SE,W,NW,SW";` -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters. -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto - - -Define how text in a shield's label is justified. -* * * - -##### shield-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation)_ - -SVG transformation definition. -* * * - -##### shield-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line. Accepted formats: JPG, PNG. -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### line-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -geometries are simplified by the given tolerance -* * * - -##### line-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will be simplified using the radial distance algorithm)_ - -geometries are simplified by the given algorithm. -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-offset `float` - - - - -Default Value: 0 -_(no offset)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon. Accepted formats: JPG, PNG. -* * * - -##### polygon-pattern-alignment `keyword` - -`local` `global` - - -Default Value: local - - -Specify whether to align pattern fills to the layer or to the map. -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(fully antialiased)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications)_ - -Apply an opacity level to the image used for the pattern -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### polygon-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified)_ - -geometries are simplified by the given tolerance -* * * - -##### polygon-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(geometry will be simplified using the radial distance algorithm)_ - -geometries are simplified by the given algorithm -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(no smoothing)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(geometry will not be transformed)_ - -Allows transformation functions to be applied to the geometry. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(opaque)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near - - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### raster-colorizer-default-mode `keyword` - -`discrete` `linear` `exact` - - -Default Value: linear -_(A linear interpolation is used to generate colors between the two nearest stops.)_ - -This can be either `discrete`, `linear` or `exact`. If it is not specified then the default is `linear`. -* * * - -##### raster-colorizer-default-color `color` - - - - -Default Value: transparent -_(Pixels that are not colored by the colorizer stops will be transparent)_ - -This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent -* * * - -##### raster-colorizer-epsilon `float` - - - - -Default Value: 1.1920928955078125e-07 -_(Pixels must very closely match the stop filter otherwise they will not be colored.)_ - -This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. -* * * - -##### raster-colorizer-stops `tags` - - - - -Default Value: -_(No colorization will happen without supplying stops.)_ - -Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like `stop(100,#fff,exact)`. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none - - -Image file to represent a point. Accepted formats: SVG, PNG, JPG. -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache)_ - -Control whether the placement of the feature will prevent the placement of other features. -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A value from 0 to 1 to control the opacity of the point. -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid - - -Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation)_ - -SVG transformation definition. -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `string` - - - - -Default Value: - - -Value to use for a text label. Data columns are specified using brackets like [column_name] -* * * - -##### text-face-name `string` - - - - -Default Value: - - -Font name and style to render a label in -* * * - -##### text-size `float` - - - - -Default Value: 10 - - -Text size in pixels -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 - - -Define the amount of text (of the total) present on successive lines when wrapping occurs -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 - - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false - - -Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. -* * * - -##### text-wrap-character `string` - - - - -Default Value: " " - - -Use this character instead of a space to wrap long text. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 - - -Distance between repeated text labels on a line (aka. label-spacing). -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 - - -Horizontal spacing adjustment between characters in pixels. -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 - - -Vertical spacing adjustment between lines in pixels. -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: 0 - - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 - - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: #000000 - - -Specifies the color for the text -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque)_ - -A number from 0 to 1 specifying the opacity for the text -* * * - -##### text-halo-fill `color` - - - - -Default Value: #FFFFFF -_(white)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo)_ - -Specify the radius of the halo in pixels -* * * - -##### text-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full - - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### text-dx `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. -* * * - -##### text-dy `float` - - - - -Default Value: 0 - - -Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text up. -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false - - -Avoid placing labels that intersect with tile boundaries. -* * * - -##### text-min-distance `float` - - - - -Default Value: 0 - - -Minimum permitted distance to the next text symbolizer. -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 - - -Minimum distance a text label will be placed from the edge of a metatile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the metatile. -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all paths)_ - -Place labels only on paths longer than this value. -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 - - -Rotate the text. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point - - -Control the style of placement of a point versus the geometry it is attached to. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy - - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: - - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` - - -Default Value: none - - -Transform the case of the characters. -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto - - -The text's horizontal alignment from its centerpoint. -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives.)_ - -Define how text is justified -* * * - -##### text-clip `boolean` - - - - -Default Value: true -_(geometry will be clipped to map bounds before rendering)_ - -Geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(add the current symbolizer on top of other symbolizer)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: #FFFFFF - - -The color of the buildings walls. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 - - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 - - -The height of the building in pixels. -* * * - - -## debug - -##### debug-mode `string` - - - - -Default Value: collision - - -The mode for debug rendering. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/3.0.0.md b/docs/3.0.0.md deleted file mode 100644 index 84dc97639..000000000 --- a/docs/3.0.0.md +++ /dev/null @@ -1,2479 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more `image-filters` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all `image-filters` have been applied. See `direct-image-filters` if you want to apply a filter directly to the main canvas. -* * * - -##### image-filters-inflate `boolean` - - - - -Default Value: false -_(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)_ - -A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). -* * * - -##### direct-image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters to apply to the main canvas (see the `image-filters` doc for how they work on a separate canvas). -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(No separate buffer will be used and no alpha will be applied to the style after rendering.)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(Will be rendered transparent.)_ - -Map Background color. -* * * - -##### background-image `uri` - - - - -Default Value: -_(No background image will be used.)_ - -An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### background-image-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(The background-image will be blended with the background normally (placed on top of any existing background-color).)_ - -Set the compositing operation used to blend the image into the background. -* * * - -##### background-image-opacity `float` - - - - -Default Value: 1 -_(The image opacity will not be changed when applied to the map background.)_ - -Set the opacity of the image. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space.)_ - -Map spatial reference (proj4 string). -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used.)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### maximum-extent `string` - - - - -Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34 -_(All data will be clipped to global mercator extent (default is applied in Carto.js).)_ - -An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map. -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered.)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -Fill color to assign to a polygon. -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the polygon. -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon edges. -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### polygon-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extend outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### polygon-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: black -_(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)_ - -The color of a drawn line. -* * * - -##### line-width `float` - - - - -Default Value: 1 -_(The line will be rendered 1 pixel wide.)_ - -The width of a line in pixels. -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of a line. -* * * - -##### line-join `keyword` - -`miter` `miter-revert` `round` `bevel` - - -Default Value: miter -_(The line joins will be rendered using a miter look.)_ - -The behavior of lines when joining. -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt -_(The line endings will be rendered using a butt look.)_ - -The display of line endings. -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of stroke line. -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'.)_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### line-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` -Status: *unstable* - - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The line will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: none -_(An ellipse or circle, if width equals height.)_ - -A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity of the marker.)_ - -The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The fill opacity of the marker. This property will also set the `fill-opacity` of elements in an SVG loaded from a file. -* * * - -##### marker-line-color `color` - - - - -Default Value: black -_(The marker will be drawn with a black outline.)_ - -The color of the stroke around the marker. This property will also set the `stroke` of elements in an SVG loaded from a file. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 -_(The marker will be drawn with an outline of .5 pixels wide.)_ - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. This property will also set the `stroke-width` of elements in an SVG loaded from a file. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque. This property will also set the `stroke-opacity` of elements in an SVG loaded from a file.)_ - -The opacity of a line. -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` `vertex-first` `vertex-last` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry.)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons. -* * * - -##### marker-multi-policy `keyword` - -`each` `whole` `largest` - - -Default Value: each -_(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)_ - -A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). -* * * - -##### marker-type `keyword` -Status: *deprecated* - - -`arrow` `ellipse` - - -Default Value: ellipse -_(The marker shape is an ellipse.)_ - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). -* * * - -##### marker-width `float` - - - - -Default Value: 10 -_(The marker width is 10 pixels.)_ - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 -_(The marker height is 10 pixels.)_ - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue -_(The marker fill color is blue.)_ - -The color of the area of the marker. This property will also set the `fill` of elements in an SVG loaded from a file. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow markers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-avoid-edges `boolean` - - - - -Default Value: false -_(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing markers that intersect with tile boundaries. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Value to control whether the placement of the feature will prevent the placement of other features. -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 -_(In the case of marker-placement:line then draw a marker every 100 pixels along a line.)_ - -Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. Any value less than 1 will be ignored and the default will be used instead. -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 -_(N/A: not intended to be changed.)_ - -N/A: not intended to be changed. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform marker instance with specified function. Ignores map scale factor. -* * * - -##### marker-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### marker-simplify `float` - - - - -Default Value: 0 -_(Geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### marker-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform marker geometry with specified function. -* * * - -##### marker-offset `float` - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a marker from a line a number of pixels parallel to its actual path. Positive values move the marker left, negative values move it right (relative to the directionality of the line). -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### marker-direction `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` `up` `down` - - -Default Value: right -_(Markers are oriented to the right in the line direction.)_ - -How markers should be placed along lines. With the "auto" setting when marker is upside down the marker is automatically rotated by 180 degrees to keep it upright. The "auto-down" value places marker in the opposite orientation to "auto". The "left" or "right" settings can be used to force marker to always be placed along a line in a given direction and therefore disables rotating if marker appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down markers rather than trying to flip it. The "up" and "down" settings don't adjust marker's orientation to the line direction. -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: -_(No text label will be rendered with the shield.)_ - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### shield-face-name `string` - - - - -Default Value: none - - -Font name and style to use for the shield text. -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image. -* * * - -##### shield-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -The size of the shield text in pixels. -* * * - -##### shield-fill `color` - - - - -Default Value: black -_(The shield text will be rendered black.)_ - -The color of the shield text. -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this shield should be placed. Point placement places one shield on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false -_(Shields will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing shields that intersect with tile boundaries. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a shield collides with any other text, shield, or marker.)_ - -Minimum distance that a shield can be placed from any other text, shield, or marker. -* * * - -##### shield-repeat-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance between repeated shields. If set this will prevent shields being rendered nearby each other that contain the same text. Similar to shield-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance to the next shield with the same text. Only works for line placement. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 -_(Only one shield per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated shields on a line. -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a shield is nearby a tile boundary.)_ - -Minimum distance a shield will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### shield-label-position-tolerance `float` - - - - -Default Value: shield-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by shield-spacing/2.0 to try placement again.)_ - -Allows the shield to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: white -_(The shield halo text will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### shield-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The shield will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### shield-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform shield halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### shield-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### shield-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing between lines of multiline labels (in pixels). -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. -* * * - -##### shield-dx `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. -* * * - -##### shield-dy `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the image used for the shield. -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the text placed on top of the shield. -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -The shield's horizontal alignment from its centerpoint. -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle -_(TODO.)_ - -The shield's vertical alignment from its centerpoint. -* * * - -##### shield-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. -* * * - -##### shield-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `shield-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(No text transformation will be applied.)_ - -Transform the case of the characters. -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -Define how text in a shield's label is justified. -* * * - -##### shield-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform shield instance with specified function. Ignores map scale factor. -* * * - -##### shield-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### shield-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for shield placement by the given tolerance. -* * * - -##### shield-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for shield placement by the given algorithm. -* * * - -##### shield-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for shield placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### line-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### line-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-offset `float` - - - - -Default Value: 0 -_(The line will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function and apply pattern to transformed geometry. -* * * - -##### line-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform line pattern instance with specified function. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### polygon-pattern-alignment `keyword` - -`global` `local` - - -Default Value: global -_(Patterns will be aligned to the map (or tile boundaries) when being repeated across polygons. This is ideal for seamless patterns in tiled rendering.)_ - -Specify whether to align pattern fills to the layer's geometry (local) or to the map (global). -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges. -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### polygon-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function and apply pattern to transformed geometry. -* * * - -##### polygon-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform polygon pattern instance with specified function. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near -_(Nearest neighboor resampling will be used to scale the image to the target size of the map.)_ - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image.)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### raster-colorizer-default-mode `keyword` - -`discrete` `linear` `exact` - - -Default Value: linear -_(A linear interpolation is used to generate colors between the two nearest stops.)_ - -This can be either `discrete`, `linear` or `exact`. If it is not specified then the default is `linear`. -* * * - -##### raster-colorizer-default-color `color` - - - - -Default Value: transparent -_(Pixels that are not colored by the colorizer stops will be transparent.)_ - -This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent. -* * * - -##### raster-colorizer-epsilon `float` - - - - -Default Value: 1.1920928955078125e-07 -_(Pixels must very closely match the stop filter otherwise they will not be colored.)_ - -This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. -* * * - -##### raster-colorizer-stops `tags` - - - - -Default Value: -_(No colorization will happen without supplying stops.)_ - -Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like `stop(100,#fff,exact)`. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none -_(A 4x4 black square will be rendered.)_ - -Image file to represent a point. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Control whether the placement of the feature will prevent the placement of other features. -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A value from 0 to 1 to control the opacity of the point. -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid -_(The centroid of the geometry will be used to place the point.)_ - -Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform point instance with specified function. Ignores map scale factor. -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `string` - - - - -Default Value: none - - -Value to use for a text label. Data columns are specified using brackets like [column_name]. -* * * - -##### text-face-name `string` - - - - -Default Value: none - - -Font name and style to render a label in. -* * * - -##### text-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -Text size in pixels. -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 -_(TODO.)_ - -Define the amount of text (of the total) present on successive lines when wrapping occurs. -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### text-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long text. -* * * - -##### text-repeat-wrap-character `boolean` -Status: *unstable* - - - - - -Default Value: false -_(Character will be removed when used to wrap a line.)_ - -Keep the character used to wrap a line instead of removing it, and repeat it on the new line. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 -_(Only one label per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated text labels on a line. -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing adjustment between characters in pixels. This value is ignored when `horizontal-alignment` is set to `adjust`. Typographic ligatures are turned off when this value is greater than zero. -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing adjustment between lines in pixels. -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: text-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by text-spacing/2.0 to try placement again.)_ - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 -_(The label will not be placed if a character falls on a line with an angle sharper than 22.5 degrees.)_ - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: black -_(The text will be rendered black.)_ - -Specifies the color for the text. -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text. -* * * - -##### text-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### text-halo-fill `color` - - - - -Default Value: white -_(The halo will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### text-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The text will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### text-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform text halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the X axis. With "dummy" placement-type, a positive value displaces to the right. With "simple" placement-type, it is either left, right or unchanged, depending on the placement selected. Any non-zero value implies "horizontal-alignment" changes to "left" by default. Has no effect with 'line' text-placement-type. -* * * - -##### text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the Y axis. With "dummy" placement-type, a positive value displaces downwards. With "simple" placement-type, it is either up, down or unchanged, depending on the placement selected. With "line" placement-type, a positive value displaces above the path. -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false -_(Text will be potentially placed near tile edges and therefore may look cut off unless the same text label is rendered on each adjacent tile.)_ - -Avoid placing labels that intersect with tile boundaries. -* * * - -##### text-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a label collides with any other text, shield, or marker.)_ - -Minimum distance that a label can be placed from any other text, shield, or marker. -* * * - -##### text-repeat-distance `float` - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance between repeated text. If set this will prevent text labels being rendered nearby each other that contain the same text. Similar to text-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### text-min-distance `float` -Status: *deprecated* - - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by `text-repeat-distance` and `text-margin` -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a text label is nearby a tile boundary.)_ - -Minimum distance a text label will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all geometries no matter how small they are.)_ - -Place labels only on polygons and lines with a bounding width longer than this value (in pixels). -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 -_(Text is not rotated and is displayed upright.)_ - -Rotate the text. (only works with text-placement:point). -* * * - -##### text-rotate-displacement `boolean` - - - - -Default Value: false -_(Label center is used for rotation.)_ - -Rotates the displacement around the placement origin by the angle given by "orientation". -* * * - -##### text-upright `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` - - -Default Value: auto -_(Text will be positioned upright automatically.)_ - -How this label should be placed along lines. By default when more than half of a label's characters are upside down the label is automatically flipped to keep it upright. By changing this parameter you can prevent this "auto-upright" behavior. The "auto-down" value places text in the opposite orientation to "auto". The "left" or "right" settings can be used to force text to always be placed along a line in a given direction and therefore disables flipping if text appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down text rather than trying to flip it. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this label should be placed. Point placement places one label on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(Transform text instance with specified function. Ignores map scale factor.)_ - -Transform the case of the characters. -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` `adjust` - - -Default Value: auto -_(TODO.)_ - -The text's horizontal alignment from it's centerpoint. If `placement` is set to `line`, then `adjust` can be set to auto-fit the text to the length of the path by dynamically calculating `character-spacing`. -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives.)_ - -Define how text is justified. -* * * - -##### text-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### text-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for text placement by the given tolerance. -* * * - -##### text-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for text placement by the given algorithm. -* * * - -##### text-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for text placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-font-feature-settings `string` - - - - -Default Value: -_(Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when `character-spacing` is greater than zero.)_ - -Comma separated list of OpenType typographic features. The syntax and semantics conforms to `font-feature-settings` from W3C CSS. -* * * - -##### text-largest-bbox-only `boolean` -Status: *experimental* - - - - - -Default Value: true -_(For multipolygons only polygon with largest bbox area is labeled (does not apply to other geometries).)_ - -Controls default labeling behavior on multipolygons. The default is true and means that only the polygon with largest bbox is labeled. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -The color of the buildings fill. Note: 0.8 will be used to multiply each color component to auto-generate a darkened wall color. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 -_(Buildings will not have a visual height and will instead look like flat polygons.)_ - -The height of the building in pixels. -* * * - - -## debug - -##### debug-mode `string` - - - - -Default Value: collision -_(The otherwise invisible collision boxes will be rendered as squares on the map.)_ - -The mode for debug rendering. -* * * - - -## dot - -##### dot-fill `color` - - - - -Default Value: gray -_(The dot fill color is gray.)_ - -The color of the area of the dot. -* * * - -##### dot-opacity `float` - - - - -Default Value: 1 -_(The opacity of the dot.)_ - -The overall opacity of the dot. -* * * - -##### dot-width `float` - - - - -Default Value: 1 -_(The marker width is 1 pixel.)_ - -The width of the dot in pixels. -* * * - -##### dot-height `float` - - - - -Default Value: 1 -_(The marker height is 1 pixels.)_ - -The height of the dot in pixels. -* * * - -##### dot-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/3.0.3.md b/docs/3.0.3.md deleted file mode 100644 index 36510ce7f..000000000 --- a/docs/3.0.3.md +++ /dev/null @@ -1,2479 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `color-blind-protanope` `color-blind-deuteranope` `color-blind-tritanope` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more `image-filters` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all `image-filters` have been applied. See `direct-image-filters` if you want to apply a filter directly to the main canvas. -* * * - -##### image-filters-inflate `boolean` - - - - -Default Value: false -_(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)_ - -A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). -* * * - -##### direct-image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `color-blind-protanope` `color-blind-deuteranope` `color-blind-tritanope` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters to apply to the main canvas (see the `image-filters` doc for how they work on a separate canvas). -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(No separate buffer will be used and no alpha will be applied to the style after rendering.)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(Will be rendered transparent.)_ - -Map Background color. -* * * - -##### background-image `uri` - - - - -Default Value: -_(No background image will be used.)_ - -An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### background-image-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(The background-image will be blended with the background normally (placed on top of any existing background-color).)_ - -Set the compositing operation used to blend the image into the background. -* * * - -##### background-image-opacity `float` - - - - -Default Value: 1 -_(The image opacity will not be changed when applied to the map background.)_ - -Set the opacity of the image. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space.)_ - -Map spatial reference (proj4 string). -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used.)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### maximum-extent `string` - - - - -Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34 -_(All data will be clipped to global mercator extent (default is applied in Carto.js).)_ - -An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map. -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered.)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -Fill color to assign to a polygon. -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the polygon. -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon edges. -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### polygon-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extend outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### polygon-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: black -_(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)_ - -The color of a drawn line. -* * * - -##### line-width `float` - - - - -Default Value: 1 -_(The line will be rendered 1 pixel wide.)_ - -The width of a line in pixels. -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of a line. -* * * - -##### line-join `keyword` - -`miter` `miter-revert` `round` `bevel` - - -Default Value: miter -_(The line joins will be rendered using a miter look.)_ - -The behavior of lines when joining. -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt -_(The line endings will be rendered using a butt look.)_ - -The display of line endings. -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of stroke line. -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'.)_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### line-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` -Status: *unstable* - - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The line will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: none -_(An ellipse or circle, if width equals height.)_ - -A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity of the marker.)_ - -The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The fill opacity of the marker. This property will also set the `fill-opacity` of elements in an SVG loaded from a file. -* * * - -##### marker-line-color `color` - - - - -Default Value: black -_(The marker will be drawn with a black outline.)_ - -The color of the stroke around the marker. This property will also set the `stroke` of elements in an SVG loaded from a file. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 -_(The marker will be drawn with an outline of .5 pixels wide.)_ - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. This property will also set the `stroke-width` of elements in an SVG loaded from a file. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque. This property will also set the `stroke-opacity` of elements in an SVG loaded from a file.)_ - -The opacity of a line. -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` `vertex-first` `vertex-last` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry.)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons. -* * * - -##### marker-multi-policy `keyword` - -`each` `whole` `largest` - - -Default Value: each -_(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)_ - -A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). -* * * - -##### marker-type `keyword` -Status: *deprecated* - - -`arrow` `ellipse` - - -Default Value: ellipse -_(The marker shape is an ellipse.)_ - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). -* * * - -##### marker-width `float` - - - - -Default Value: 10 -_(The marker width is 10 pixels.)_ - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 -_(The marker height is 10 pixels.)_ - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue -_(The marker fill color is blue.)_ - -The color of the area of the marker. This property will also set the `fill` of elements in an SVG loaded from a file. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow markers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-avoid-edges `boolean` - - - - -Default Value: false -_(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing markers that intersect with tile boundaries. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Value to control whether the placement of the feature will prevent the placement of other features. -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 -_(In the case of marker-placement:line then draw a marker every 100 pixels along a line.)_ - -Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. Any value less than 1 will be ignored and the default will be used instead. -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 -_(N/A: not intended to be changed.)_ - -N/A: not intended to be changed. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform marker instance with specified function. Ignores map scale factor. -* * * - -##### marker-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### marker-simplify `float` - - - - -Default Value: 0 -_(Geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### marker-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform marker geometry with specified function. -* * * - -##### marker-offset `float` - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a marker from a line a number of pixels parallel to its actual path. Positive values move the marker left, negative values move it right (relative to the directionality of the line). -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### marker-direction `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` `up` `down` - - -Default Value: right -_(Markers are oriented to the right in the line direction.)_ - -How markers should be placed along lines. With the "auto" setting when marker is upside down the marker is automatically rotated by 180 degrees to keep it upright. The "auto-down" value places marker in the opposite orientation to "auto". The "left" or "right" settings can be used to force marker to always be placed along a line in a given direction and therefore disables rotating if marker appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down markers rather than trying to flip it. The "up" and "down" settings don't adjust marker's orientation to the line direction. -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: -_(No text label will be rendered with the shield.)_ - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### shield-face-name `string` - - - - -Default Value: none - - -Font name and style to use for the shield text. -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image. -* * * - -##### shield-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -The size of the shield text in pixels. -* * * - -##### shield-fill `color` - - - - -Default Value: black -_(The shield text will be rendered black.)_ - -The color of the shield text. -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this shield should be placed. Point placement places one shield on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false -_(Shields will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing shields that intersect with tile boundaries. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a shield collides with any other text, shield, or marker.)_ - -Minimum distance that a shield can be placed from any other text, shield, or marker. -* * * - -##### shield-repeat-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance between repeated shields. If set this will prevent shields being rendered nearby each other that contain the same text. Similar to shield-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance to the next shield with the same text. Only works for line placement. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 -_(Only one shield per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated shields on a line. -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a shield is nearby a tile boundary.)_ - -Minimum distance a shield will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### shield-label-position-tolerance `float` - - - - -Default Value: shield-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by shield-spacing/2.0 to try placement again.)_ - -Allows the shield to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: white -_(The shield halo text will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### shield-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The shield will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### shield-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform shield halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### shield-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### shield-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing between lines of multiline labels (in pixels). -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. -* * * - -##### shield-dx `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. -* * * - -##### shield-dy `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the image used for the shield. -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the text placed on top of the shield. -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -The shield's horizontal alignment from its centerpoint. -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle -_(TODO.)_ - -The shield's vertical alignment from its centerpoint. -* * * - -##### shield-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. -* * * - -##### shield-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `shield-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(No text transformation will be applied.)_ - -Transform the case of the characters. -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -Define how text in a shield's label is justified. -* * * - -##### shield-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform shield instance with specified function. Ignores map scale factor. -* * * - -##### shield-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### shield-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for shield placement by the given tolerance. -* * * - -##### shield-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for shield placement by the given algorithm. -* * * - -##### shield-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for shield placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### line-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### line-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-offset `float` - - - - -Default Value: 0 -_(The line will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function and apply pattern to transformed geometry. -* * * - -##### line-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform line pattern instance with specified function. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### polygon-pattern-alignment `keyword` - -`global` `local` - - -Default Value: global -_(Patterns will be aligned to the map (or tile boundaries) when being repeated across polygons. This is ideal for seamless patterns in tiled rendering.)_ - -Specify whether to align pattern fills to the layer's geometry (local) or to the map (global). -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges. -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### polygon-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function and apply pattern to transformed geometry. -* * * - -##### polygon-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform polygon pattern instance with specified function. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near -_(Nearest neighboor resampling will be used to scale the image to the target size of the map.)_ - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image.)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### raster-colorizer-default-mode `keyword` - -`discrete` `linear` `exact` - - -Default Value: linear -_(A linear interpolation is used to generate colors between the two nearest stops.)_ - -This can be either `discrete`, `linear` or `exact`. If it is not specified then the default is `linear`. -* * * - -##### raster-colorizer-default-color `color` - - - - -Default Value: transparent -_(Pixels that are not colored by the colorizer stops will be transparent.)_ - -This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent. -* * * - -##### raster-colorizer-epsilon `float` - - - - -Default Value: 1.1920928955078125e-07 -_(Pixels must very closely match the stop filter otherwise they will not be colored.)_ - -This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. -* * * - -##### raster-colorizer-stops `tags` - - - - -Default Value: -_(No colorization will happen without supplying stops.)_ - -Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like `stop(100,#fff,exact)`. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none -_(A 4x4 black square will be rendered.)_ - -Image file to represent a point. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Control whether the placement of the feature will prevent the placement of other features. -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A value from 0 to 1 to control the opacity of the point. -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid -_(The centroid of the geometry will be used to place the point.)_ - -Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform point instance with specified function. Ignores map scale factor. -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `string` - - - - -Default Value: none - - -Value to use for a text label. Data columns are specified using brackets like [column_name]. -* * * - -##### text-face-name `string` - - - - -Default Value: none - - -Font name and style to render a label in. -* * * - -##### text-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -Text size in pixels. -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 -_(TODO.)_ - -Define the amount of text (of the total) present on successive lines when wrapping occurs. -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### text-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long text. -* * * - -##### text-repeat-wrap-character `boolean` -Status: *unstable* - - - - - -Default Value: false -_(Character will be removed when used to wrap a line.)_ - -Keep the character used to wrap a line instead of removing it, and repeat it on the new line. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 -_(Only one label per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated text labels on a line. -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing adjustment between characters in pixels. This value is ignored when `horizontal-alignment` is set to `adjust`. Typographic ligatures are turned off when this value is greater than zero. -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing adjustment between lines in pixels. -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: text-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by text-spacing/2.0 to try placement again.)_ - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 -_(The label will not be placed if a character falls on a line with an angle sharper than 22.5 degrees.)_ - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: black -_(The text will be rendered black.)_ - -Specifies the color for the text. -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text. -* * * - -##### text-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### text-halo-fill `color` - - - - -Default Value: white -_(The halo will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### text-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The text will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### text-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform text halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the X axis. With "dummy" placement-type, a positive value displaces to the right. With "simple" placement-type, it is either left, right or unchanged, depending on the placement selected. Any non-zero value implies "horizontal-alignment" changes to "left" by default. Has no effect with 'line' text-placement-type. -* * * - -##### text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the Y axis. With "dummy" placement-type, a positive value displaces downwards. With "simple" placement-type, it is either up, down or unchanged, depending on the placement selected. With "line" placement-type, a positive value displaces above the path. -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false -_(Text will be potentially placed near tile edges and therefore may look cut off unless the same text label is rendered on each adjacent tile.)_ - -Avoid placing labels that intersect with tile boundaries. -* * * - -##### text-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a label collides with any other text, shield, or marker.)_ - -Minimum distance that a label can be placed from any other text, shield, or marker. -* * * - -##### text-repeat-distance `float` - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance between repeated text. If set this will prevent text labels being rendered nearby each other that contain the same text. Similar to text-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### text-min-distance `float` -Status: *deprecated* - - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by `text-repeat-distance` and `text-margin` -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a text label is nearby a tile boundary.)_ - -Minimum distance a text label will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all geometries no matter how small they are.)_ - -Place labels only on polygons and lines with a bounding width longer than this value (in pixels). -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 -_(Text is not rotated and is displayed upright.)_ - -Rotate the text. (only works with text-placement:point). -* * * - -##### text-rotate-displacement `boolean` - - - - -Default Value: false -_(Label center is used for rotation.)_ - -Rotates the displacement around the placement origin by the angle given by "orientation". -* * * - -##### text-upright `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` - - -Default Value: auto -_(Text will be positioned upright automatically.)_ - -How this label should be placed along lines. By default when more than half of a label's characters are upside down the label is automatically flipped to keep it upright. By changing this parameter you can prevent this "auto-upright" behavior. The "auto-down" value places text in the opposite orientation to "auto". The "left" or "right" settings can be used to force text to always be placed along a line in a given direction and therefore disables flipping if text appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down text rather than trying to flip it. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this label should be placed. Point placement places one label on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(Transform text instance with specified function. Ignores map scale factor.)_ - -Transform the case of the characters. -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` `adjust` - - -Default Value: auto -_(TODO.)_ - -The text's horizontal alignment from it's centerpoint. If `placement` is set to `line`, then `adjust` can be set to auto-fit the text to the length of the path by dynamically calculating `character-spacing`. -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives.)_ - -Define how text is justified. -* * * - -##### text-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### text-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for text placement by the given tolerance. -* * * - -##### text-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for text placement by the given algorithm. -* * * - -##### text-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for text placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-font-feature-settings `string` - - - - -Default Value: -_(Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when `character-spacing` is greater than zero.)_ - -Comma separated list of OpenType typographic features. The syntax and semantics conforms to `font-feature-settings` from W3C CSS. -* * * - -##### text-largest-bbox-only `boolean` -Status: *experimental* - - - - - -Default Value: true -_(For multipolygons only polygon with largest bbox area is labeled (does not apply to other geometries).)_ - -Controls default labeling behavior on multipolygons. The default is true and means that only the polygon with largest bbox is labeled. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -The color of the buildings fill. Note: 0.8 will be used to multiply each color component to auto-generate a darkened wall color. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 -_(Buildings will not have a visual height and will instead look like flat polygons.)_ - -The height of the building in pixels. -* * * - - -## debug - -##### debug-mode `string` - - - - -Default Value: collision -_(The otherwise invisible collision boxes will be rendered as squares on the map.)_ - -The mode for debug rendering. -* * * - - -## dot - -##### dot-fill `color` - - - - -Default Value: gray -_(The dot fill color is gray.)_ - -The color of the area of the dot. -* * * - -##### dot-opacity `float` - - - - -Default Value: 1 -_(The opacity of the dot.)_ - -The overall opacity of the dot. -* * * - -##### dot-width `float` - - - - -Default Value: 1 -_(The marker width is 1 pixel.)_ - -The width of the dot in pixels. -* * * - -##### dot-height `float` - - - - -Default Value: 1 -_(The marker height is 1 pixels.)_ - -The height of the dot in pixels. -* * * - -##### dot-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/3.0.6.md b/docs/3.0.6.md deleted file mode 100644 index 36510ce7f..000000000 --- a/docs/3.0.6.md +++ /dev/null @@ -1,2479 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `color-blind-protanope` `color-blind-deuteranope` `color-blind-tritanope` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more `image-filters` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all `image-filters` have been applied. See `direct-image-filters` if you want to apply a filter directly to the main canvas. -* * * - -##### image-filters-inflate `boolean` - - - - -Default Value: false -_(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)_ - -A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). -* * * - -##### direct-image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `color-blind-protanope` `color-blind-deuteranope` `color-blind-tritanope` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters to apply to the main canvas (see the `image-filters` doc for how they work on a separate canvas). -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(No separate buffer will be used and no alpha will be applied to the style after rendering.)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(Will be rendered transparent.)_ - -Map Background color. -* * * - -##### background-image `uri` - - - - -Default Value: -_(No background image will be used.)_ - -An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### background-image-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(The background-image will be blended with the background normally (placed on top of any existing background-color).)_ - -Set the compositing operation used to blend the image into the background. -* * * - -##### background-image-opacity `float` - - - - -Default Value: 1 -_(The image opacity will not be changed when applied to the map background.)_ - -Set the opacity of the image. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space.)_ - -Map spatial reference (proj4 string). -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used.)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### maximum-extent `string` - - - - -Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34 -_(All data will be clipped to global mercator extent (default is applied in Carto.js).)_ - -An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map. -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered.)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -Fill color to assign to a polygon. -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the polygon. -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon edges. -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### polygon-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extend outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### polygon-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: black -_(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)_ - -The color of a drawn line. -* * * - -##### line-width `float` - - - - -Default Value: 1 -_(The line will be rendered 1 pixel wide.)_ - -The width of a line in pixels. -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of a line. -* * * - -##### line-join `keyword` - -`miter` `miter-revert` `round` `bevel` - - -Default Value: miter -_(The line joins will be rendered using a miter look.)_ - -The behavior of lines when joining. -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt -_(The line endings will be rendered using a butt look.)_ - -The display of line endings. -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of stroke line. -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'.)_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### line-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` -Status: *unstable* - - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The line will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: none -_(An ellipse or circle, if width equals height.)_ - -A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity of the marker.)_ - -The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The fill opacity of the marker. This property will also set the `fill-opacity` of elements in an SVG loaded from a file. -* * * - -##### marker-line-color `color` - - - - -Default Value: black -_(The marker will be drawn with a black outline.)_ - -The color of the stroke around the marker. This property will also set the `stroke` of elements in an SVG loaded from a file. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 -_(The marker will be drawn with an outline of .5 pixels wide.)_ - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. This property will also set the `stroke-width` of elements in an SVG loaded from a file. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque. This property will also set the `stroke-opacity` of elements in an SVG loaded from a file.)_ - -The opacity of a line. -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` `vertex-first` `vertex-last` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry.)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons. -* * * - -##### marker-multi-policy `keyword` - -`each` `whole` `largest` - - -Default Value: each -_(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)_ - -A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). -* * * - -##### marker-type `keyword` -Status: *deprecated* - - -`arrow` `ellipse` - - -Default Value: ellipse -_(The marker shape is an ellipse.)_ - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). -* * * - -##### marker-width `float` - - - - -Default Value: 10 -_(The marker width is 10 pixels.)_ - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 -_(The marker height is 10 pixels.)_ - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue -_(The marker fill color is blue.)_ - -The color of the area of the marker. This property will also set the `fill` of elements in an SVG loaded from a file. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow markers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-avoid-edges `boolean` - - - - -Default Value: false -_(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing markers that intersect with tile boundaries. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Value to control whether the placement of the feature will prevent the placement of other features. -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 -_(In the case of marker-placement:line then draw a marker every 100 pixels along a line.)_ - -Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. Any value less than 1 will be ignored and the default will be used instead. -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 -_(N/A: not intended to be changed.)_ - -N/A: not intended to be changed. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform marker instance with specified function. Ignores map scale factor. -* * * - -##### marker-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### marker-simplify `float` - - - - -Default Value: 0 -_(Geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### marker-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform marker geometry with specified function. -* * * - -##### marker-offset `float` - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a marker from a line a number of pixels parallel to its actual path. Positive values move the marker left, negative values move it right (relative to the directionality of the line). -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### marker-direction `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` `up` `down` - - -Default Value: right -_(Markers are oriented to the right in the line direction.)_ - -How markers should be placed along lines. With the "auto" setting when marker is upside down the marker is automatically rotated by 180 degrees to keep it upright. The "auto-down" value places marker in the opposite orientation to "auto". The "left" or "right" settings can be used to force marker to always be placed along a line in a given direction and therefore disables rotating if marker appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down markers rather than trying to flip it. The "up" and "down" settings don't adjust marker's orientation to the line direction. -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: -_(No text label will be rendered with the shield.)_ - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### shield-face-name `string` - - - - -Default Value: none - - -Font name and style to use for the shield text. -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image. -* * * - -##### shield-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -The size of the shield text in pixels. -* * * - -##### shield-fill `color` - - - - -Default Value: black -_(The shield text will be rendered black.)_ - -The color of the shield text. -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this shield should be placed. Point placement places one shield on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false -_(Shields will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing shields that intersect with tile boundaries. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a shield collides with any other text, shield, or marker.)_ - -Minimum distance that a shield can be placed from any other text, shield, or marker. -* * * - -##### shield-repeat-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance between repeated shields. If set this will prevent shields being rendered nearby each other that contain the same text. Similar to shield-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance to the next shield with the same text. Only works for line placement. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 -_(Only one shield per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated shields on a line. -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a shield is nearby a tile boundary.)_ - -Minimum distance a shield will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### shield-label-position-tolerance `float` - - - - -Default Value: shield-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by shield-spacing/2.0 to try placement again.)_ - -Allows the shield to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: white -_(The shield halo text will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### shield-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The shield will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### shield-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform shield halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### shield-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### shield-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing between lines of multiline labels (in pixels). -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. -* * * - -##### shield-dx `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. -* * * - -##### shield-dy `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the image used for the shield. -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the text placed on top of the shield. -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -The shield's horizontal alignment from its centerpoint. -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle -_(TODO.)_ - -The shield's vertical alignment from its centerpoint. -* * * - -##### shield-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. -* * * - -##### shield-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `shield-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(No text transformation will be applied.)_ - -Transform the case of the characters. -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -Define how text in a shield's label is justified. -* * * - -##### shield-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform shield instance with specified function. Ignores map scale factor. -* * * - -##### shield-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### shield-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for shield placement by the given tolerance. -* * * - -##### shield-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for shield placement by the given algorithm. -* * * - -##### shield-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for shield placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### line-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### line-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-offset `float` - - - - -Default Value: 0 -_(The line will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function and apply pattern to transformed geometry. -* * * - -##### line-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform line pattern instance with specified function. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### polygon-pattern-alignment `keyword` - -`global` `local` - - -Default Value: global -_(Patterns will be aligned to the map (or tile boundaries) when being repeated across polygons. This is ideal for seamless patterns in tiled rendering.)_ - -Specify whether to align pattern fills to the layer's geometry (local) or to the map (global). -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges. -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### polygon-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function and apply pattern to transformed geometry. -* * * - -##### polygon-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform polygon pattern instance with specified function. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near -_(Nearest neighboor resampling will be used to scale the image to the target size of the map.)_ - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image.)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### raster-colorizer-default-mode `keyword` - -`discrete` `linear` `exact` - - -Default Value: linear -_(A linear interpolation is used to generate colors between the two nearest stops.)_ - -This can be either `discrete`, `linear` or `exact`. If it is not specified then the default is `linear`. -* * * - -##### raster-colorizer-default-color `color` - - - - -Default Value: transparent -_(Pixels that are not colored by the colorizer stops will be transparent.)_ - -This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent. -* * * - -##### raster-colorizer-epsilon `float` - - - - -Default Value: 1.1920928955078125e-07 -_(Pixels must very closely match the stop filter otherwise they will not be colored.)_ - -This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. -* * * - -##### raster-colorizer-stops `tags` - - - - -Default Value: -_(No colorization will happen without supplying stops.)_ - -Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like `stop(100,#fff,exact)`. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none -_(A 4x4 black square will be rendered.)_ - -Image file to represent a point. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Control whether the placement of the feature will prevent the placement of other features. -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A value from 0 to 1 to control the opacity of the point. -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid -_(The centroid of the geometry will be used to place the point.)_ - -Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform point instance with specified function. Ignores map scale factor. -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `string` - - - - -Default Value: none - - -Value to use for a text label. Data columns are specified using brackets like [column_name]. -* * * - -##### text-face-name `string` - - - - -Default Value: none - - -Font name and style to render a label in. -* * * - -##### text-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -Text size in pixels. -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 -_(TODO.)_ - -Define the amount of text (of the total) present on successive lines when wrapping occurs. -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### text-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long text. -* * * - -##### text-repeat-wrap-character `boolean` -Status: *unstable* - - - - - -Default Value: false -_(Character will be removed when used to wrap a line.)_ - -Keep the character used to wrap a line instead of removing it, and repeat it on the new line. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 -_(Only one label per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated text labels on a line. -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing adjustment between characters in pixels. This value is ignored when `horizontal-alignment` is set to `adjust`. Typographic ligatures are turned off when this value is greater than zero. -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing adjustment between lines in pixels. -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: text-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by text-spacing/2.0 to try placement again.)_ - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 -_(The label will not be placed if a character falls on a line with an angle sharper than 22.5 degrees.)_ - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: black -_(The text will be rendered black.)_ - -Specifies the color for the text. -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text. -* * * - -##### text-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### text-halo-fill `color` - - - - -Default Value: white -_(The halo will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### text-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The text will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### text-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform text halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the X axis. With "dummy" placement-type, a positive value displaces to the right. With "simple" placement-type, it is either left, right or unchanged, depending on the placement selected. Any non-zero value implies "horizontal-alignment" changes to "left" by default. Has no effect with 'line' text-placement-type. -* * * - -##### text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the Y axis. With "dummy" placement-type, a positive value displaces downwards. With "simple" placement-type, it is either up, down or unchanged, depending on the placement selected. With "line" placement-type, a positive value displaces above the path. -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false -_(Text will be potentially placed near tile edges and therefore may look cut off unless the same text label is rendered on each adjacent tile.)_ - -Avoid placing labels that intersect with tile boundaries. -* * * - -##### text-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a label collides with any other text, shield, or marker.)_ - -Minimum distance that a label can be placed from any other text, shield, or marker. -* * * - -##### text-repeat-distance `float` - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance between repeated text. If set this will prevent text labels being rendered nearby each other that contain the same text. Similar to text-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### text-min-distance `float` -Status: *deprecated* - - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by `text-repeat-distance` and `text-margin` -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a text label is nearby a tile boundary.)_ - -Minimum distance a text label will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all geometries no matter how small they are.)_ - -Place labels only on polygons and lines with a bounding width longer than this value (in pixels). -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 -_(Text is not rotated and is displayed upright.)_ - -Rotate the text. (only works with text-placement:point). -* * * - -##### text-rotate-displacement `boolean` - - - - -Default Value: false -_(Label center is used for rotation.)_ - -Rotates the displacement around the placement origin by the angle given by "orientation". -* * * - -##### text-upright `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` - - -Default Value: auto -_(Text will be positioned upright automatically.)_ - -How this label should be placed along lines. By default when more than half of a label's characters are upside down the label is automatically flipped to keep it upright. By changing this parameter you can prevent this "auto-upright" behavior. The "auto-down" value places text in the opposite orientation to "auto". The "left" or "right" settings can be used to force text to always be placed along a line in a given direction and therefore disables flipping if text appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down text rather than trying to flip it. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this label should be placed. Point placement places one label on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(Transform text instance with specified function. Ignores map scale factor.)_ - -Transform the case of the characters. -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` `adjust` - - -Default Value: auto -_(TODO.)_ - -The text's horizontal alignment from it's centerpoint. If `placement` is set to `line`, then `adjust` can be set to auto-fit the text to the length of the path by dynamically calculating `character-spacing`. -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives.)_ - -Define how text is justified. -* * * - -##### text-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### text-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for text placement by the given tolerance. -* * * - -##### text-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for text placement by the given algorithm. -* * * - -##### text-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for text placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-font-feature-settings `string` - - - - -Default Value: -_(Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when `character-spacing` is greater than zero.)_ - -Comma separated list of OpenType typographic features. The syntax and semantics conforms to `font-feature-settings` from W3C CSS. -* * * - -##### text-largest-bbox-only `boolean` -Status: *experimental* - - - - - -Default Value: true -_(For multipolygons only polygon with largest bbox area is labeled (does not apply to other geometries).)_ - -Controls default labeling behavior on multipolygons. The default is true and means that only the polygon with largest bbox is labeled. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -The color of the buildings fill. Note: 0.8 will be used to multiply each color component to auto-generate a darkened wall color. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 -_(Buildings will not have a visual height and will instead look like flat polygons.)_ - -The height of the building in pixels. -* * * - - -## debug - -##### debug-mode `string` - - - - -Default Value: collision -_(The otherwise invisible collision boxes will be rendered as squares on the map.)_ - -The mode for debug rendering. -* * * - - -## dot - -##### dot-fill `color` - - - - -Default Value: gray -_(The dot fill color is gray.)_ - -The color of the area of the dot. -* * * - -##### dot-opacity `float` - - - - -Default Value: 1 -_(The opacity of the dot.)_ - -The overall opacity of the dot. -* * * - -##### dot-width `float` - - - - -Default Value: 1 -_(The marker width is 1 pixel.)_ - -The width of the dot in pixels. -* * * - -##### dot-height `float` - - - - -Default Value: 1 -_(The marker height is 1 pixels.)_ - -The height of the dot in pixels. -* * * - -##### dot-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 000000000..a7ca4aa76 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = carto +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/api/mapnik/2.0.0.rst b/docs/api/mapnik/2.0.0.rst new file mode 100644 index 000000000..c0c13536a --- /dev/null +++ b/docs/api/mapnik/2.0.0.rst @@ -0,0 +1,1924 @@ +2.0.0 +----- + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(transparent)* + +Map Background color + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(transparent)* + +An image that is repeated below all features on a map as a background. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)* + +Map spatial reference (proj4 string) + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(128,128,128,1) +*(gray and fully opaque (alpha = 1), same as rgb(128,128,128))* + +Fill color to assign to a polygon + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon edges + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the polygon + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Amount of smoothing applied + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(0,0,0,1) +*(black and fully opaque (alpha = 1), same as rgb(0,0,0))* + +The color of a drawn line + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The width of a line in pixels + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``round`` ``bevel`` + + +Default Value: miter + + +The behavior of lines when joining + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt + + +The display of line endings + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of stroke line + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +valid parameter but not currently used in renderers + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(An ellipse or circle, if width equals height)* + +An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The overall opacity of the marker + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the stroke around a marker shape. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 + + +The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` + + +Default Value: line + + +Attempt to place markers on a point once or on a line repeatedly + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse + + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue + + +The color of the area of the marker. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow makers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 + + +Space between repeated labels + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 + + +The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(no transformation)* + +An SVG transformation definition + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to use for the shield text + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The size of the shield text in pixels + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the shield text + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance to the next shield symbol, not necessarily the same shield. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The spacing between repeated occurrences of the same shield on a line + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a shield gets relative to other shields + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Length before wrapping long names. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing between lines of multiline labels (in pixels) + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the image used for the shield + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the text placed on top of the shield + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: middle + + +The shield's horizontal alignment from its centerpoint + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +shield-no-text +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Whether the shield should make room for a text label. + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: middle + + +Define how text in a shield's label is justified + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``local`` ``global`` + + +Default Value: local + + +Specify whether to align pattern fills to the layer or to the map. + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon pattern edges + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``normal`` ``grain_merge`` ``grain_merge2`` ``multiply`` ``multiply2`` ``divide`` ``divide2`` ``screen`` ``hard_light`` + + +Default Value: normal + + +The blending technique used to overlay this raster image on the layer below. Normal simply covers the layer. Grain merge adds the two layers together and subtracts 128 from the value, making the resulting area sometimes high-contrast. Screen often gives a lighter, washed-out appearance. Multiply multiplies the pixels, giving a high-contrast result. Divide divides the upper layer by the lower layer, making a lighter version. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``fast`` ``bilinear`` ``bilinear8`` ``bicubic`` ``spline16`` ``gaussian`` ``lanczos`` + + +Default Value: fast + + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``integer`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to represent a point + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A value from 0 to 1 to control the opacity of the point + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid + + +How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a text label. Data columns are specified using brackets like [column_name] + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to render a label in + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +Text size in pixels + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Define the amount of text (of the total) present on successive lines when wrapping occurs + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long text. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Distance between repeated text labels on a line + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing adjustment between characters in pixels + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing adjustment between lines in pixels + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Allows the label to be displaced from its ideal position by a number of pixels + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: none + + +If present, the maximum angle change, in degrees, allowed between adjacent characters in a label. This will stop label placement around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #000000 + + +Specifies the color for the text + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A number from 0 to 1 specifying the opacity for the text + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` + + +Default Value: middle +*(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum permitted distance to the next text symbolizer. + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a text symbolizer gets relative to other text + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all paths)* + +Place labels only on paths longer than this value. + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Rotate the text. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +Control the style of placement of a point versus the geometry it is attached to. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` + + +Default Value: dummy + + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. See TextSymbolizer docs for format. + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: middle + + +The text's horizontal alignment from its centerpoint + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` + + +Default Value: center + + +Set the text alignment. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF + + +The color of the buildings walls. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The height of the building in pixels. + +------------ + + + + + diff --git a/docs/api/mapnik/2.0.1.rst b/docs/api/mapnik/2.0.1.rst new file mode 100644 index 000000000..5a90369ff --- /dev/null +++ b/docs/api/mapnik/2.0.1.rst @@ -0,0 +1,1924 @@ +2.0.1 +----- + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(transparent)* + +Map Background color + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(transparent)* + +An image that is repeated below all features on a map as a background. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)* + +Map spatial reference (proj4 string) + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(128,128,128,1) +*(gray and fully opaque (alpha = 1), same as rgb(128,128,128))* + +Fill color to assign to a polygon + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon edges + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the polygon + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Amount of smoothing applied + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(0,0,0,1) +*(black and fully opaque (alpha = 1), same as rgb(0,0,0))* + +The color of a drawn line + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The width of a line in pixels + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``round`` ``bevel`` + + +Default Value: miter + + +The behavior of lines when joining + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt + + +The display of line endings + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of stroke line + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +valid parameter but not currently used in renderers + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(An ellipse or circle, if width equals height)* + +An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The overall opacity of the marker + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the stroke around a marker shape. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 + + +The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` + + +Default Value: line + + +Attempt to place markers on a point once or on a line repeatedly + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse + + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue + + +The color of the area of the marker. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow makers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 + + +Space between repeated labels + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 + + +The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(no transformation)* + +An SVG transformation definition + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to use for the shield text + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The size of the shield text in pixels + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the shield text + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance to the next shield symbol, not necessarily the same shield. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The spacing between repeated occurrences of the same shield on a line + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a shield gets relative to other shields + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Length before wrapping long names. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing between lines of multiline labels (in pixels) + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the image used for the shield + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the text placed on top of the shield + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: middle + + +The shield's horizontal alignment from its centerpoint + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +shield-no-text +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Whether the shield should make room for a text label. + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: middle + + +Define how text in a shield's label is justified + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``local`` ``global`` + + +Default Value: local + + +Specify whether to align pattern fills to the layer or to the map. + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon pattern edges + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``normal`` ``grain_merge`` ``grain_merge2`` ``multiply`` ``multiply2`` ``divide`` ``divide2`` ``screen`` ``hard_light`` + + +Default Value: normal + + +The blending technique used to overlay this raster image on the layer below. Normal simply covers the layer. Grain merge adds the two layers together and subtracts 128 from the value, making the resulting area sometimes high-contrast. Screen often gives a lighter, washed-out appearance. Multiply multiplies the pixels, giving a high-contrast result. Divide divides the upper layer by the lower layer, making a lighter version. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``fast`` ``bilinear`` ``bilinear8`` ``bicubic`` ``spline16`` ``gaussian`` ``lanczos`` + + +Default Value: fast + + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``integer`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to represent a point + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A value from 0 to 1 to control the opacity of the point + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid + + +How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a text label. Data columns are specified using brackets like [column_name] + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to render a label in + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +Text size in pixels + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Define the amount of text (of the total) present on successive lines when wrapping occurs + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long text. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Distance between repeated text labels on a line + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing adjustment between characters in pixels + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing adjustment between lines in pixels + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Allows the label to be displaced from its ideal position by a number of pixels + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: none + + +If present, the maximum angle change, in degrees, allowed between adjacent characters in a label. This will stop label placement around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #000000 + + +Specifies the color for the text + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A number from 0 to 1 specifying the opacity for the text + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` + + +Default Value: middle +*(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum permitted distance to the next text symbolizer. + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a text symbolizer gets relative to other text + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all paths)* + +Place labels only on paths longer than this value. + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Rotate the text. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +Control the style of placement of a point versus the geometry it is attached to. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` + + +Default Value: dummy + + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. See TextSymbolizer docs for format. + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: middle + + +The text's horizontal alignment from its centerpoint + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` + + +Default Value: center + + +Set the text alignment. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF + + +The color of the buildings walls. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The height of the building in pixels. + +------------ + + + + + diff --git a/docs/api/mapnik/2.0.2.rst b/docs/api/mapnik/2.0.2.rst new file mode 100644 index 000000000..c81f14c4e --- /dev/null +++ b/docs/api/mapnik/2.0.2.rst @@ -0,0 +1,1924 @@ +2.0.2 +----- + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(transparent)* + +Map Background color + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(transparent)* + +An image that is repeated below all features on a map as a background. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)* + +Map spatial reference (proj4 string) + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(128,128,128,1) +*(gray and fully opaque (alpha = 1), same as rgb(128,128,128))* + +Fill color to assign to a polygon + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon edges + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the polygon + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Amount of smoothing applied + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(0,0,0,1) +*(black and fully opaque (alpha = 1), same as rgb(0,0,0))* + +The color of a drawn line + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The width of a line in pixels + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``round`` ``bevel`` + + +Default Value: miter + + +The behavior of lines when joining + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt + + +The display of line endings + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of stroke line + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +valid parameter but not currently used in renderers + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(An ellipse or circle, if width equals height)* + +An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The overall opacity of the marker + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the stroke around a marker shape. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 + + +The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` + + +Default Value: line + + +Attempt to place markers on a point once or on a line repeatedly + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse + + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue + + +The color of the area of the marker. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow makers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 + + +Space between repeated labels + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 + + +The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(no transformation)* + +An SVG transformation definition + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to use for the shield text + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The size of the shield text in pixels + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the shield text + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance to the next shield symbol, not necessarily the same shield. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The spacing between repeated occurrences of the same shield on a line + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a shield gets relative to other shields + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Length before wrapping long names. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing between lines of multiline labels (in pixels) + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the image used for the shield + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the text placed on top of the shield + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: middle + + +The shield's horizontal alignment from its centerpoint + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +shield-no-text +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Whether the shield should make room for a text label. + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: middle + + +Define how text in a shield's label is justified + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``local`` ``global`` + + +Default Value: local + + +Specify whether to align pattern fills to the layer or to the map. + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon pattern edges + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``normal`` ``grain_merge`` ``grain_merge2`` ``multiply`` ``multiply2`` ``divide`` ``divide2`` ``screen`` ``hard_light`` + + +Default Value: normal + + +The blending technique used to overlay this raster image on the layer below. Normal simply covers the layer. Grain merge adds the two layers together and subtracts 128 from the value, making the resulting area sometimes high-contrast. Screen often gives a lighter, washed-out appearance. Multiply multiplies the pixels, giving a high-contrast result. Divide divides the upper layer by the lower layer, making a lighter version. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``fast`` ``bilinear`` ``bilinear8`` ``bicubic`` ``spline16`` ``gaussian`` ``lanczos`` + + +Default Value: fast + + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``integer`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to represent a point + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A value from 0 to 1 to control the opacity of the point + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid + + +How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a text label. Data columns are specified using brackets like [column_name] + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to render a label in + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +Text size in pixels + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Define the amount of text (of the total) present on successive lines when wrapping occurs + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long text. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Distance between repeated text labels on a line + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing adjustment between characters in pixels + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing adjustment between lines in pixels + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Allows the label to be displaced from its ideal position by a number of pixels + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: none + + +If present, the maximum angle change, in degrees, allowed between adjacent characters in a label. This will stop label placement around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #000000 + + +Specifies the color for the text + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A number from 0 to 1 specifying the opacity for the text + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` + + +Default Value: middle +*(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum permitted distance to the next text symbolizer. + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a text symbolizer gets relative to other text + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all paths)* + +Place labels only on paths longer than this value. + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Rotate the text. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +Control the style of placement of a point versus the geometry it is attached to. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` + + +Default Value: dummy + + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. See TextSymbolizer docs for format. + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: middle + + +The text's horizontal alignment from its centerpoint + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` + + +Default Value: center + + +Set the text alignment. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF + + +The color of the buildings walls. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The height of the building in pixels. + +------------ + + + + + diff --git a/docs/api/mapnik/2.1.0.rst b/docs/api/mapnik/2.1.0.rst new file mode 100644 index 000000000..64661a78f --- /dev/null +++ b/docs/api/mapnik/2.1.0.rst @@ -0,0 +1,2542 @@ +2.1.0 +----- + + +All elements +^^^^^^^^^^^^ + + +image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` + +Default Value: none +*(no filters)* + +A list of image filters. + +------------ + + +comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current layer on top of other layers)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + +opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(no separate buffer will be used and no alpha will be applied to the style after rendering)* + +An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer) + +------------ + + + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(transparent)* + +Map Background color + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(transparent)* + +An image that is repeated below all features on a map as a background. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)* + +Map spatial reference (proj4 string) + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(128,128,128,1) +*(gray and fully opaque (alpha = 1), same as rgb(128,128,128))* + +Fill color to assign to a polygon + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the polygon + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon edges + +------------ + + +polygon-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h + +------------ + + +polygon-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(0,0,0,1) +*(black and fully opaque (alpha = 1), same as rgb(0,0,0))* + +The color of a drawn line + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The width of a line in pixels + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``round`` ``bevel`` + + +Default Value: miter + + +The behavior of lines when joining + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt + + +The display of line endings + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of stroke line + +------------ + + +line-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled) + +------------ + + +line-miterlimit +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 4 +*(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')* + +The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. + +------------ + + +line-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no offset)* + +Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + +line-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(An ellipse or circle, if width equals height)* + +An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The stroke-opacity and fill-opacity will be used)* + +The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. + +------------ + + +marker-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The fill opacity of the marker + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the stroke around a marker shape. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 + + +The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``interior`` + + +Default Value: point +*(Place markers at the center point (centroid) of the geometry)* + +Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse + + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue + + +The color of the area of the marker. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow makers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 + + +Space between repeated labels + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 + + +The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + +marker-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +marker-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +marker-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +marker-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to use for the shield text + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The size of the shield text in pixels + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the shield text + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +shield-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow shields to overlap with other map elements already placed.)* + +Control whether overlapping shields are shown or hidden. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance to the next shield symbol, not necessarily the same shield. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The spacing between repeated occurrences of the same shield on a line + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a shield gets relative to other shields + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +shield-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing between lines of multiline labels (in pixels) + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the image used for the shield + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the text placed on top of the shield + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The shield's horizontal alignment from its centerpoint + +------------ + + +shield-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: middle + + +The shield's vertical alignment from its centerpoint + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``center`` ``right`` ``auto`` + + +Default Value: auto + + +Define how text in a shield's label is justified + +------------ + + +shield-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +shield-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line + +------------ + + +line-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``local`` ``global`` + + +Default Value: local + + +Specify whether to align pattern fills to the layer or to the map. + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon pattern edges + +------------ + + +polygon-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications)* + +(Default 1.0) - Apply an opacity level to the image used for the pattern + +------------ + + +polygon-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``near`` ``fast`` ``bilinear`` ``bilinear8`` ``bicubic`` ``spline16`` ``spline36`` ``hanning`` ``hamming`` ``hermite`` ``kaiser`` ``quadric`` ``catrom`` ``gaussian`` ``bessel`` ``mitchell`` ``sinc`` ``lanczos`` ``blackman`` + + +Default Value: near + + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + +raster-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to represent a point + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A value from 0 to 1 to control the opacity of the point + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid + + +How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + +point-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a text label. Data columns are specified using brackets like [column_name] + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to render a label in + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +Text size in pixels + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Define the amount of text (of the total) present on successive lines when wrapping occurs + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +text-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long text. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Distance between repeated text labels on a line (aka. label-spacing) + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing adjustment between characters in pixels + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing adjustment between lines in pixels + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line) + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 22.5 + + +The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #000000 + + +Specifies the color for the text + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A number from 0 to 1 specifying the opacity for the text + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: auto +*(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum permitted distance to the next text symbolizer. + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a text symbolizer gets relative to other text + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all paths)* + +Place labels only on paths longer than this value. + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Rotate the text. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +Control the style of placement of a point versus the geometry it is attached to. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy + + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``text-placements: "E,NE,SE,W,NW,SW";`` + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The text's horizontal alignment from its centerpoint + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` ``auto`` + + +Default Value: auto +*(Auto alignment means that text will be centered by default except when using the ``placement-type`` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the ``text-placements`` directives)* + +Define how text is justified + +------------ + + +text-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +text-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF + + +The color of the buildings walls. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The height of the building in pixels. + +------------ + + + + + diff --git a/docs/api/mapnik/2.1.1.rst b/docs/api/mapnik/2.1.1.rst new file mode 100644 index 000000000..1c0f984bd --- /dev/null +++ b/docs/api/mapnik/2.1.1.rst @@ -0,0 +1,2559 @@ +2.1.1 +----- + + +All elements +^^^^^^^^^^^^ + + +image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` + +Default Value: none +*(no filters)* + +A list of image filters. + +------------ + + +comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current layer on top of other layers)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + +opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(no separate buffer will be used and no alpha will be applied to the style after rendering)* + +An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer) + +------------ + + + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(transparent)* + +Map Background color + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(transparent)* + +An image that is repeated below all features on a map as a background. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)* + +Map spatial reference (proj4 string) + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(128,128,128,1) +*(gray and fully opaque (alpha = 1), same as rgb(128,128,128))* + +Fill color to assign to a polygon + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the polygon + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon edges + +------------ + + +polygon-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h + +------------ + + +polygon-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(0,0,0,1) +*(black and fully opaque (alpha = 1), same as rgb(0,0,0))* + +The color of a drawn line + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The width of a line in pixels + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``round`` ``bevel`` + + +Default Value: miter + + +The behavior of lines when joining + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt + + +The display of line endings + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of stroke line + +------------ + + +line-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled) + +------------ + + +line-miterlimit +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 4 +*(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')* + +The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. + +------------ + + +line-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no offset)* + +Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + +line-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(An ellipse or circle, if width equals height)* + +An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The stroke-opacity and fill-opacity will be used)* + +The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. + +------------ + + +marker-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The fill opacity of the marker + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the stroke around a marker shape. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 + + +The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``interior`` + + +Default Value: point +*(Place markers at the center point (centroid) of the geometry)* + +Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior + +------------ + + +marker-multi-policy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``each`` ``whole`` ``largest`` + + +Default Value: each +*(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each)* + +A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse + + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``expression`` + + + + + +Default Value: 10 + + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``expression`` + + + + + +Default Value: 10 + + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue + + +The color of the area of the marker. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow makers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 + + +Space between repeated labels + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 + + +The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + +marker-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +marker-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +marker-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +marker-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``expression`` + + + + + +Default Value: + + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to use for the shield text + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The size of the shield text in pixels + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the shield text + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +shield-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow shields to overlap with other map elements already placed.)* + +Control whether overlapping shields are shown or hidden. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance to the next shield symbol, not necessarily the same shield. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The spacing between repeated occurrences of the same shield on a line + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a shield gets relative to other shields + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +shield-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing between lines of multiline labels (in pixels) + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the image used for the shield + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +(Default 1.0) - opacity of the text placed on top of the shield + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The shield's horizontal alignment from its centerpoint + +------------ + + +shield-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: middle + + +The shield's vertical alignment from its centerpoint + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``center`` ``right`` ``auto`` + + +Default Value: auto + + +Define how text in a shield's label is justified + +------------ + + +shield-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +shield-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line + +------------ + + +line-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``local`` ``global`` + + +Default Value: local + + +Specify whether to align pattern fills to the layer or to the map. + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon pattern edges + +------------ + + +polygon-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications)* + +(Default 1.0) - Apply an opacity level to the image used for the pattern + +------------ + + +polygon-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``near`` ``fast`` ``bilinear`` ``bilinear8`` ``bicubic`` ``spline16`` ``spline36`` ``hanning`` ``hamming`` ``hermite`` ``kaiser`` ``quadric`` ``catrom`` ``gaussian`` ``bessel`` ``mitchell`` ``sinc`` ``lanczos`` ``blackman`` + + +Default Value: near + + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + +raster-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to represent a point + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A value from 0 to 1 to control the opacity of the point + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid + + +How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + +point-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``expression`` + + + + + +Default Value: + + +Value to use for a text label. Data columns are specified using brackets like [column_name] + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to render a label in + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +Text size in pixels + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Define the amount of text (of the total) present on successive lines when wrapping occurs + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +text-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long text. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Distance between repeated text labels on a line (aka. label-spacing) + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing adjustment between characters in pixels + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing adjustment between lines in pixels + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line) + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 22.5 + + +The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #000000 + + +Specifies the color for the text + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A number from 0 to 1 specifying the opacity for the text + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: auto +*(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Tell positioning algorithm to avoid labeling near intersection edges. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum permitted distance to the next text symbolizer. + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Determines the minimum amount of padding that a text symbolizer gets relative to other text + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all paths)* + +Place labels only on paths longer than this value. + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``expression`` + + + + + +Default Value: 0 + + +Rotate the text. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +Control the style of placement of a point versus the geometry it is attached to. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy + + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``text-placements: "E,NE,SE,W,NW,SW";`` + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The text's horizontal alignment from its centerpoint + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` ``auto`` + + +Default Value: auto +*(Auto alignment means that text will be centered by default except when using the ``placement-type`` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the ``text-placements`` directives)* + +Define how text is justified + +------------ + + +text-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +text-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF + + +The color of the buildings walls. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``expression`` + + + + + +Default Value: 0 + + +The height of the building in pixels. + +------------ + + + + + diff --git a/docs/api/mapnik/2.2.0.rst b/docs/api/mapnik/2.2.0.rst new file mode 100644 index 000000000..038e1d77f --- /dev/null +++ b/docs/api/mapnik/2.2.0.rst @@ -0,0 +1,2871 @@ +2.2.0 +----- + + +All elements +^^^^^^^^^^^^ + + +image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``colorize-alpha`` + +Default Value: none +*(no filters)* + +A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more more ``image-filters`` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all ``image-filters`` have been applied. See ``direct-image-filters`` if you want to apply a filter directly to the main canvas. + +------------ + + +direct-image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``colorize-alpha`` + +Default Value: none +*(no filters)* + +A list of image filters to apply to the main canvas (see the ``image-filters`` doc for how they work on a separate canvas) + +------------ + + +comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current layer on top of other layers)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + +opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(no separate buffer will be used and no alpha will be applied to the style after rendering)* + +An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer) + +------------ + + + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(transparent)* + +Map Background color + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(transparent)* + +An image that is repeated below all features on a map as a background. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)* + +Map spatial reference (proj4 string) + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(128,128,128,1) +*(gray and fully opaque (alpha = 1), same as rgb(128,128,128))* + +Fill color to assign to a polygon + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the polygon + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon edges + +------------ + + +polygon-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h + +------------ + + +polygon-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +geometries are simplified by the given tolerance + +------------ + + +polygon-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will not be simplified using the radial distance algorithm)* + +geometries are simplified by the given algorithm + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(0,0,0,1) +*(black and fully opaque (alpha = 1), same as rgb(0,0,0))* + +The color of a drawn line + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The width of a line in pixels + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``round`` ``bevel`` + + +Default Value: miter + + +The behavior of lines when joining + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt + + +The display of line endings + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of stroke line + +------------ + + +line-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled) + +------------ + + +line-miterlimit +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 4 +*(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')* + +The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. + +------------ + + +line-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +geometries are simplified by the given tolerance + +------------ + + +line-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will not be simplified using the radial distance algorithm)* + +geometries are simplified by the given algorithm + +------------ + + +line-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no offset)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + +line-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(An ellipse or circle, if width equals height)* + +An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The stroke-opacity and fill-opacity will be used)* + +The overall opacity of the marker, overrides both the opacity of the fill and the opacity of the stroke. + +------------ + + +marker-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The fill opacity of the marker + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the stroke around a marker shape. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 + + +The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``interior`` + + +Default Value: point +*(Place markers at the center point (centroid) of the geometry)* + +Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior + +------------ + + +marker-multi-policy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``each`` ``whole`` ``largest`` + + +Default Value: each +*(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each)* + +A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse + + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width) + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue + + +The color of the area of the marker. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow makers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 + + +Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 + + +The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + +marker-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +marker-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +marker-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +marker-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name] + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to use for the shield text + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The size of the shield text in pixels + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the shield text + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Avoid placing shields that intersect with tile boundaries. + +------------ + + +shield-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow shields to overlap with other map elements already placed.)* + +Control whether overlapping shields are shown or hidden. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance to the next shield symbol, not necessarily the same shield. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The spacing between repeated occurrences of the same shield on a line + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance a shield will be placed from the edge of a metatile. + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +shield-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing between lines of multiline labels (in pixels) + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the image used for the shield + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the text placed on top of the shield + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The shield's horizontal alignment from its centerpoint + +------------ + + +shield-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: middle + + +The shield's vertical alignment from its centerpoint + +------------ + + +shield-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` + + +Default Value: dummy + + +Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. + +------------ + + +shield-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``shield-placements: "E,NE,SE,W,NW,SW";`` + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``center`` ``right`` ``auto`` + + +Default Value: auto + + +Define how text in a shield's label is justified + +------------ + + +shield-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + +shield-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +shield-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line + +------------ + + +line-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +geometries are simplified by the given tolerance + +------------ + + +line-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will not be simplified using the radial distance algorithm)* + +geometries are simplified by the given algorithm + +------------ + + +line-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``local`` ``global`` + + +Default Value: local + + +Specify whether to align pattern fills to the layer or to the map. + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon pattern edges + +------------ + + +polygon-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications)* + +Apply an opacity level to the image used for the pattern + +------------ + + +polygon-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +geometries are simplified by the given tolerance + +------------ + + +polygon-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will not be simplified using the radial distance algorithm)* + +geometries are simplified by the given algorithm + +------------ + + +polygon-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``near`` ``fast`` ``bilinear`` ``bilinear8`` ``bicubic`` ``spline16`` ``spline36`` ``hanning`` ``hamming`` ``hermite`` ``kaiser`` ``quadric`` ``catrom`` ``gaussian`` ``bessel`` ``mitchell`` ``sinc`` ``lanczos`` ``blackman`` + + +Default Value: near + + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + +raster-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +raster-colorizer-default-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``discrete`` ``linear`` ``exact`` + + +Default Value: linear +*(A linear interpolation is used to generate colors between the two nearest stops.)* + +This can be either ``discrete``, ``linear`` or ``exact``. If it is not specified then the default is ``linear``. + +------------ + + +raster-colorizer-default-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: transparent +*(Pixels that are not colored by the colorizer stops will be transparent)* + +This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent + +------------ + + +raster-colorizer-epsilon +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1.1920928955078125e-07 +*(Pixels must very closely match the stop filter otherwise they will not be colored.)* + +This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. + +------------ + + +raster-colorizer-stops +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``tags`` + + + + + +Default Value: +*(No colorization will happen without supplying stops.)* + +Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like ``stop(100,#fff,exact)``. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to represent a point + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +value to control whether the placement of the feature will prevent the placement of other features + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A value from 0 to 1 to control the opacity of the point + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid + + +How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation)* + +SVG transformation definition + +------------ + + +point-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a text label. Data columns are specified using brackets like [column_name] + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to render a label in + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +Text size in pixels + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Define the amount of text (of the total) present on successive lines when wrapping occurs + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in characters before wrapping text + +------------ + + +text-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Use this character instead of a space to wrap long text. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Distance between repeated text labels on a line (aka. label-spacing) + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing adjustment between characters in pixels + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing adjustment between lines in pixels + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line) + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 22.5 + + +The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #000000 + + +Specifies the color for the text + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A number from 0 to 1 specifying the opacity for the text + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +text-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: auto +*(Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Avoid placing labels that intersect with tile boundaries. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum permitted distance to the next text symbolizer. + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance a text label will be placed from the edge of a metatile. + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all paths)* + +Place labels only on paths longer than this value. + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Rotate the text. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +Control the style of placement of a point versus the geometry it is attached to. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` + + +Default Value: dummy + + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``text-placements: "E,NE,SE,W,NW,SW";`` + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The text's horizontal alignment from its centerpoint + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` ``auto`` + + +Default Value: auto +*(Auto alignment means that text will be centered by default except when using the ``placement-type`` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the ``text-placements`` directives)* + +Define how text is justified + +------------ + + +text-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +text-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF + + +The color of the buildings walls. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The height of the building in pixels. + +------------ + + + + +debug +^^^^^ + + +debug-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: collision + + +The mode for debug rendering + +------------ + + + + + diff --git a/docs/api/mapnik/2.3.0.rst b/docs/api/mapnik/2.3.0.rst new file mode 100644 index 000000000..98ccf809f --- /dev/null +++ b/docs/api/mapnik/2.3.0.rst @@ -0,0 +1,2956 @@ +2.3.0 +----- + + +All elements +^^^^^^^^^^^^ + + +image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters)* + +A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more more ``image-filters`` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all ``image-filters`` have been applied. See ``direct-image-filters`` if you want to apply a filter directly to the main canvas. + +------------ + + +image-filters-inflate +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary)* + +A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). + +------------ + + +direct-image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters)* + +A list of image filters to apply to the main canvas (see the ``image-filters`` doc for how they work on a separate canvas). + +------------ + + +comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current layer on top of other layers)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + +opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(no separate buffer will be used and no alpha will be applied to the style after rendering)* + +An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). + +------------ + + + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(transparent)* + +Map Background color. + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(transparent)* + +An image that is repeated below all features on a map as a background. Accepted formats: JPG, PNG. + +------------ + + +background-image-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(The background-image will be blended with the background normally (placed on top of any existing background-color))* + +Set the compositing operation used to blend the image into the background. + +------------ + + +background-image-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image opacity will not be changed when applied to the map background)* + +Set the opacity of the image. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space)* + +Map spatial reference (proj4 string). + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(128,128,128,1) +*(gray and fully opaque (alpha = 1), same as rgb(128,128,128))* + +Fill color to assign to a polygon. + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the polygon. + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon edges. + +------------ + + +polygon-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +polygon-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +Geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +Simplify geometries by the given tolerance. + +------------ + + +polygon-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will be simplified using the radial distance algorithm)* + +Simplify gemoetries by the given algorithm. + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: rgba(0,0,0,1) +*(black and fully opaque (alpha = 1), same as rgb(0,0,0))* + +The color of a drawn line. + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The width of a line in pixels. + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of a line. + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``round`` ``bevel`` + + +Default Value: miter + + +The behavior of lines when joining. + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt + + +The display of line endings. + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of stroke line. + +------------ + + +line-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(solid line)* + +Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). + +------------ + + +line-miterlimit +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 4 +*(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )')* + +The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. + +------------ + + +line-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +Geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +Simplify gemoetries by the given tolerance + +------------ + + +line-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will be simplified using the radial distance algorithm)* + +Simplify gemoetries by the given algorithm. + +------------ + + +line-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no offset)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + +line-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(An ellipse or circle, if width equals height.)* + +A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: SVG, JPG, PNG. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The stroke-opacity and fill-opacity of the marker.)* + +The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. + +------------ + + +marker-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The fill opacity of the marker. + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the stroke around the marker. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 + + +The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the line. + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``interior`` + + +Default Value: point +*(Place markers at the center point (centroid) of the geometry)* + +Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. + +------------ + + +marker-multi-policy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``each`` ``whole`` ``largest`` + + +Default Value: each +*(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each)* + +A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse + + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue + + +The color of the area of the marker. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow makers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +Value to control whether the placement of the feature will prevent the placement of other features. + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 + + +Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 + + +The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation)* + +SVG transformation definition. + +------------ + + +marker-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +marker-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +marker-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +marker-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text. Accepted formats: SVG, JPG, PNG. + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to use for the shield text + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +The size of the shield text in pixels. + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black + + +The color of the shield text. + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Avoid placing shields that intersect with tile boundaries. + +------------ + + +shield-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow shields to overlap with other map elements already placed.)* + +Control whether overlapping shields are shown or hidden. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance to the next shield symbol, not necessarily the same shield. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The spacing between repeated occurrences of the same shield on a line. + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance a shield will be placed from the edge of a metatile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the metatile. + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +shield-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " + + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels. + +------------ + + +shield-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing between lines of multiline labels (in pixels). + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the image used for the shield + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the text placed on top of the shield + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The shield's horizontal alignment from its centerpoint + +------------ + + +shield-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: middle + + +The shield's vertical alignment from its centerpoint + +------------ + + +shield-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy + + +Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. + +------------ + + +shield-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``shield-placements: "E,NE,SE,W,NW,SW";`` + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters. + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``center`` ``right`` ``auto`` + + +Default Value: auto + + +Define how text in a shield's label is justified. + +------------ + + +shield-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation)* + +SVG transformation definition. + +------------ + + +shield-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +shield-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line. Accepted formats: JPG, PNG. + +------------ + + +line-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +line-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +geometries are simplified by the given tolerance + +------------ + + +line-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will be simplified using the radial distance algorithm)* + +geometries are simplified by the given algorithm. + +------------ + + +line-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-pattern-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no offset)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +line-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon. Accepted formats: JPG, PNG. + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``local`` ``global`` + + +Default Value: local + + +Specify whether to align pattern fills to the layer or to the map. + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(fully antialiased)* +Range: 0-1 +Level of antialiasing of polygon pattern edges + +------------ + + +polygon-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications)* + +Apply an opacity level to the image used for the pattern + +------------ + + +polygon-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +polygon-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified)* + +geometries are simplified by the given tolerance + +------------ + + +polygon-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(geometry will be simplified using the radial distance algorithm)* + +geometries are simplified by the given algorithm + +------------ + + +polygon-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no smoothing)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(geometry will not be transformed)* + +Allows transformation functions to be applied to the geometry. + +------------ + + +polygon-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(opaque)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``near`` ``fast`` ``bilinear`` ``bicubic`` ``spline16`` ``spline36`` ``hanning`` ``hamming`` ``hermite`` ``kaiser`` ``quadric`` ``catrom`` ``gaussian`` ``bessel`` ``mitchell`` ``sinc`` ``lanczos`` ``blackman`` + + +Default Value: near + + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + +raster-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +raster-colorizer-default-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``discrete`` ``linear`` ``exact`` + + +Default Value: linear +*(A linear interpolation is used to generate colors between the two nearest stops.)* + +This can be either ``discrete``, ``linear`` or ``exact``. If it is not specified then the default is ``linear``. + +------------ + + +raster-colorizer-default-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: transparent +*(Pixels that are not colored by the colorizer stops will be transparent)* + +This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent + +------------ + + +raster-colorizer-epsilon +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1.1920928955078125e-07 +*(Pixels must very closely match the stop filter otherwise they will not be colored.)* + +This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. + +------------ + + +raster-colorizer-stops +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``tags`` + + + + + +Default Value: +*(No colorization will happen without supplying stops.)* + +Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like ``stop(100,#fff,exact)``. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to represent a point. Accepted formats: SVG, PNG, JPG. + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache)* + +Control whether the placement of the feature will prevent the placement of other features. + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A value from 0 to 1 to control the opacity of the point. + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid + + +Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation)* + +SVG transformation definition. + +------------ + + +point-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Value to use for a text label. Data columns are specified using brackets like [column_name] + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +Font name and style to render a label in + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 + + +Text size in pixels + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Define the amount of text (of the total) present on successive lines when wrapping occurs + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +text-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width. + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " + + +Use this character instead of a space to wrap long text. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 + + +Distance between repeated text labels on a line (aka. label-spacing). + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Horizontal spacing adjustment between characters in pixels. + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Vertical spacing adjustment between lines in pixels. + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 22.5 + + +The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #000000 + + +Specifies the color for the text + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque)* + +A number from 0 to 1 specifying the opacity for the text + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF +*(white)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo)* + +Specify the radius of the halo in pixels + +------------ + + +text-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full + + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text up. + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: auto +*(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false + + +Avoid placing labels that intersect with tile boundaries. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum permitted distance to the next text symbolizer. + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Minimum distance a text label will be placed from the edge of a metatile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the metatile. + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all paths)* + +Place labels only on paths longer than this value. + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +Rotate the text. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point + + +Control the style of placement of a point versus the geometry it is attached to. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy + + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: + + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``text-placements: "E,NE,SE,W,NW,SW";`` + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` + + +Default Value: none + + +Transform the case of the characters. + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto + + +The text's horizontal alignment from its centerpoint. + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` ``auto`` + + +Default Value: auto +*(Auto alignment means that text will be centered by default except when using the ``placement-type`` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the ``text-placements`` directives.)* + +Define how text is justified + +------------ + + +text-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: true +*(geometry will be clipped to map bounds before rendering)* + +Geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts. + +------------ + + +text-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(add the current symbolizer on top of other symbolizer)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: #FFFFFF + + +The color of the buildings walls. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 + + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 + + +The height of the building in pixels. + +------------ + + + + +debug +^^^^^ + + +debug-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: collision + + +The mode for debug rendering. + +------------ + + + + + diff --git a/docs/api/mapnik/3.0.0.rst b/docs/api/mapnik/3.0.0.rst new file mode 100644 index 000000000..8d3241994 --- /dev/null +++ b/docs/api/mapnik/3.0.0.rst @@ -0,0 +1,3584 @@ +3.0.0 +----- + + +All elements +^^^^^^^^^^^^ + + +image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters.)* + +A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more ``image-filters`` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all ``image-filters`` have been applied. See ``direct-image-filters`` if you want to apply a filter directly to the main canvas. + +------------ + + +image-filters-inflate +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)* + +A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). + +------------ + + +direct-image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters.)* + +A list of image filters to apply to the main canvas (see the ``image-filters`` doc for how they work on a separate canvas). + +------------ + + +comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current layer on top of other layers.)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + +opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(No separate buffer will be used and no alpha will be applied to the style after rendering.)* + +An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). + +------------ + + + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(Will be rendered transparent.)* + +Map Background color. + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(No background image will be used.)* + +An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +background-image-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(The background-image will be blended with the background normally (placed on top of any existing background-color).)* + +Set the compositing operation used to blend the image into the background. + +------------ + + +background-image-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image opacity will not be changed when applied to the map background.)* + +Set the opacity of the image. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space.)* + +Map spatial reference (proj4 string). + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used.)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +maximum-extent +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34 +*(All data will be clipped to global mercator extent (default is applied in Carto.js).)* + +An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map. + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered.)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: The color gray will be used for fill. +*(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)* + +Fill color to assign to a polygon. + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the polygon. + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of polygon edges. + +------------ + + +polygon-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +polygon-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extend outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +polygon-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify geometries by the given tolerance. + +------------ + + +polygon-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify geometries by the given algorithm. + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform polygon geometry with specified function. + +------------ + + +polygon-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)* + +The color of a drawn line. + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The line will be rendered 1 pixel wide.)* + +The width of a line in pixels. + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of a line. + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``miter-revert`` ``round`` ``bevel`` + + +Default Value: miter +*(The line joins will be rendered using a miter look.)* + +The behavior of lines when joining. + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt +*(The line endings will be rendered using a butt look.)* + +The display of line endings. + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of stroke line. + +------------ + + +line-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(The line will be drawn without dashes.)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(The line will be drawn without dashes.)* + +Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). + +------------ + + +line-miterlimit +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 4 +*(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'.)* + +The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. + +------------ + + +line-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +line-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify geometries by the given tolerance. + +------------ + + +line-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify geometries by the given algorithm. + +------------ + + +line-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + +**Status: unstable** + + + + + +Default Value: 0 +*(Will not be offset.)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The line will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + +line-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform line geometry with specified function. + +------------ + + +line-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(An ellipse or circle, if width equals height.)* + +A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The stroke-opacity and fill-opacity of the marker.)* + +The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. + +------------ + + +marker-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The fill opacity of the marker. This property will also set the ``fill-opacity`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The marker will be drawn with a black outline.)* + +The color of the stroke around the marker. This property will also set the ``stroke`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 +*(The marker will be drawn with an outline of .5 pixels wide.)* + +The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. This property will also set the ``stroke-width`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque. This property will also set the ``stroke-opacity`` of elements in an SVG loaded from a file.)* + +The opacity of a line. + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``interior`` ``vertex-first`` ``vertex-last`` + + +Default Value: point +*(Place markers at the center point (centroid) of the geometry.)* + +Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons. + +------------ + + +marker-multi-policy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``each`` ``whole`` ``largest`` + + +Default Value: each +*(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)* + +A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + +**Status: deprecated** + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse +*(The marker shape is an ellipse.)* + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(The marker width is 10 pixels.)* + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(The marker height is 10 pixels.)* + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue +*(The marker fill color is blue.)* + +The color of the area of the marker. This property will also set the ``fill`` of elements in an SVG loaded from a file. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow markers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)* + +Avoid placing markers that intersect with tile boundaries. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache.)* + +Value to control whether the placement of the feature will prevent the placement of other features. + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 +*(In the case of marker-placement:line then draw a marker every 100 pixels along a line.)* + +Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. Any value less than 1 will be ignored and the default will be used instead. + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 +*(N/A: not intended to be changed.)* + +N/A: not intended to be changed. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform marker instance with specified function. Ignores map scale factor. + +------------ + + +marker-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +marker-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +marker-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +marker-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +marker-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform marker geometry with specified function. + +------------ + + +marker-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Will not be offset.)* + +Offsets a marker from a line a number of pixels parallel to its actual path. Positive values move the marker left, negative values move it right (relative to the directionality of the line). + +------------ + + +marker-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +marker-direction +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``auto`` ``auto-down`` ``left`` ``right`` ``left-only`` ``right-only`` ``up`` ``down`` + + +Default Value: right +*(Markers are oriented to the right in the line direction.)* + +How markers should be placed along lines. With the "auto" setting when marker is upside down the marker is automatically rotated by 180 degrees to keep it upright. The "auto-down" value places marker in the opposite orientation to "auto". The "left" or "right" settings can be used to force marker to always be placed along a line in a given direction and therefore disables rotating if marker appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down markers rather than trying to flip it. The "up" and "down" settings don't adjust marker's orientation to the line direction. + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No text label will be rendered with the shield.)* + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Font name and style to use for the shield text. + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image. + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(Font size of 10 will be used to render text.)* + +The size of the shield text in pixels. + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The shield text will be rendered black.)* + +The color of the shield text. + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point +*(One shield will be placed per geometry.)* + +How this shield should be placed. Point placement places one shield on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Shields will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)* + +Avoid placing shields that intersect with tile boundaries. + +------------ + + +shield-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow shields to overlap with other map elements already placed.)* + +Control whether overlapping shields are shown or hidden. + +------------ + + +shield-margin +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No extra margin will be used to determine if a shield collides with any other text, shield, or marker.)* + +Minimum distance that a shield can be placed from any other text, shield, or marker. + +------------ + + +shield-repeat-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shields with the same text will be rendered without restriction.)* + +Minimum distance between repeated shields. If set this will prevent shields being rendered nearby each other that contain the same text. Similar to shield-min-distance with the difference that it works the same no matter what placement strategy is used. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shields with the same text will be rendered without restriction.)* + +Minimum distance to the next shield with the same text. Only works for line placement. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Only one shield per line will attempt to be placed.)* + +Distance the renderer should use to try to place repeated shields on a line. + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No margin will be used to detect if a shield is nearby a tile boundary.)* + +Minimum distance a shield will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. + +------------ + + +shield-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: shield-spacing/2.0 +*(If a shield cannot be placed then the renderer will advance by shield-spacing/2.0 to try placement again.)* + +Allows the shield to be displaced from its ideal position by a number of pixels (only works with placement:line). + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Text will not be wrapped.)* + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +shield-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Wrapped lines will be a bit longer than wrap-width.)* + +Wrap text before wrap-width is reached. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " +*(Lines will be wrapped when whitespace is encountered.)* + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: white +*(The shield halo text will be rendered white.)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo.)* + +Specify the radius of the halo in pixels. + +------------ + + +shield-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The shield will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +shield-halo-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation.)* + +Transform shield halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. + +------------ + + +shield-halo-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +shield-halo-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text halo. + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(The default character spacing of the font will be used.)* + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default font spacing will be used.)* + +Vertical spacing between lines of multiline labels (in pixels). + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shield will not be displaced.)* + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shield will not be displaced.)* + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the image used for the shield. + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the text placed on top of the shield. + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto +*(TODO.)* + +The shield's horizontal alignment from its centerpoint. + +------------ + + +shield-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: middle +*(TODO.)* + +The shield's vertical alignment from its centerpoint. + +------------ + + +shield-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy +*(Alternative placements will not be enabled.)* + +Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. + +------------ + + +shield-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No alternative placements will be used.)* + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``shield-placements: "E,NE,SE,W,NW,SW";``. + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` ``reverse`` + + +Default Value: none +*(No text transformation will be applied.)* + +Transform the case of the characters. + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``center`` ``right`` ``auto`` + + +Default Value: auto +*(TODO.)* + +Define how text in a shield's label is justified. + +------------ + + +shield-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform shield instance with specified function. Ignores map scale factor. + +------------ + + +shield-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +shield-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify the geometries used for shield placement by the given tolerance. + +------------ + + +shield-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify the geometries used for shield placement by the given algorithm. + +------------ + + +shield-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out the angles of the geometry used for shield placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +shield-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +line-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +line-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications.)* + +Apply an opacity level to the image used for the pattern. + +------------ + + +line-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +line-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +line-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-pattern-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The line will not be offset.)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform line geometry with specified function and apply pattern to transformed geometry. + +------------ + + +line-pattern-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform line pattern instance with specified function. + +------------ + + +line-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``global`` ``local`` + + +Default Value: global +*(Patterns will be aligned to the map (or tile boundaries) when being repeated across polygons. This is ideal for seamless patterns in tiled rendering.)* + +Specify whether to align pattern fills to the layer's geometry (local) or to the map (global). + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of polygon pattern edges. + +------------ + + +polygon-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications.)* + +Apply an opacity level to the image used for the pattern. + +------------ + + +polygon-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +polygon-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +polygon-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +polygon-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform polygon geometry with specified function and apply pattern to transformed geometry. + +------------ + + +polygon-pattern-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform polygon pattern instance with specified function. + +------------ + + +polygon-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``near`` ``fast`` ``bilinear`` ``bicubic`` ``spline16`` ``spline36`` ``hanning`` ``hamming`` ``hermite`` ``kaiser`` ``quadric`` ``catrom`` ``gaussian`` ``bessel`` ``mitchell`` ``sinc`` ``lanczos`` ``blackman`` + + +Default Value: near +*(Nearest neighboor resampling will be used to scale the image to the target size of the map.)* + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image.)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + +raster-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +raster-colorizer-default-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``discrete`` ``linear`` ``exact`` + + +Default Value: linear +*(A linear interpolation is used to generate colors between the two nearest stops.)* + +This can be either ``discrete``, ``linear`` or ``exact``. If it is not specified then the default is ``linear``. + +------------ + + +raster-colorizer-default-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: transparent +*(Pixels that are not colored by the colorizer stops will be transparent.)* + +This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent. + +------------ + + +raster-colorizer-epsilon +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1.1920928955078125e-07 +*(Pixels must very closely match the stop filter otherwise they will not be colored.)* + +This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. + +------------ + + +raster-colorizer-stops +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``tags`` + + + + + +Default Value: +*(No colorization will happen without supplying stops.)* + +Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like ``stop(100,#fff,exact)``. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(A 4x4 black square will be rendered.)* + +Image file to represent a point. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache.)* + +Control whether the placement of the feature will prevent the placement of other features. + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A value from 0 to 1 to control the opacity of the point. + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid +*(The centroid of the geometry will be used to place the point.)* + +Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform point instance with specified function. Ignores map scale factor. + +------------ + + +point-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Value to use for a text label. Data columns are specified using brackets like [column_name]. + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Font name and style to render a label in. + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(Font size of 10 will be used to render text.)* + +Text size in pixels. + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(TODO.)* + +Define the amount of text (of the total) present on successive lines when wrapping occurs. + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Text will not be wrapped.)* + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +text-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Wrapped lines will be a bit longer than wrap-width.)* + +Wrap text before wrap-width is reached. + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " +*(Lines will be wrapped when whitespace is encountered.)* + +Use this character instead of a space to wrap long text. + +------------ + + +text-repeat-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + +**Status: unstable** + + + + + +Default Value: false +*(Character will be removed when used to wrap a line.)* + +Keep the character used to wrap a line instead of removing it, and repeat it on the new line. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Only one label per line will attempt to be placed.)* + +Distance the renderer should use to try to place repeated text labels on a line. + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default character spacing of the font will be used.)* + +Horizontal spacing adjustment between characters in pixels. This value is ignored when ``horizontal-alignment`` is set to ``adjust``. Typographic ligatures are turned off when this value is greater than zero. + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default font spacing will be used.)* + +Vertical spacing adjustment between lines in pixels. + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: text-spacing/2.0 +*(If a shield cannot be placed then the renderer will advance by text-spacing/2.0 to try placement again.)* + +Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 22.5 +*(The label will not be placed if a character falls on a line with an angle sharper than 22.5 degrees.)* + +The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The text will be rendered black.)* + +Specifies the color for the text. + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text. + +------------ + + +text-halo-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text halo. + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: white +*(The halo will be rendered white.)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo.)* + +Specify the radius of the halo in pixels. + +------------ + + +text-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The text will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +text-halo-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation.)* + +Transform text halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text by fixed amount, in pixels, +/- along the X axis. With "dummy" placement-type, a positive value displaces to the right. With "simple" placement-type, it is either left, right or unchanged, depending on the placement selected. Any non-zero value implies "horizontal-alignment" changes to "left" by default. Has no effect with 'line' text-placement-type. + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text by fixed amount, in pixels, +/- along the Y axis. With "dummy" placement-type, a positive value displaces downwards. With "simple" placement-type, it is either up, down or unchanged, depending on the placement selected. With "line" placement-type, a positive value displaces above the path. + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: auto +*(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Text will be potentially placed near tile edges and therefore may look cut off unless the same text label is rendered on each adjacent tile.)* + +Avoid placing labels that intersect with tile boundaries. + +------------ + + +text-margin +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No extra margin will be used to determine if a label collides with any other text, shield, or marker.)* + +Minimum distance that a label can be placed from any other text, shield, or marker. + +------------ + + +text-repeat-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Labels with the same text will be rendered without restriction.)* + +Minimum distance between repeated text. If set this will prevent text labels being rendered nearby each other that contain the same text. Similar to text-min-distance with the difference that it works the same no matter what placement strategy is used. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + +**Status: deprecated** + + + + + +Default Value: 0 +*(Labels with the same text will be rendered without restriction.)* + +Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by ``text-repeat-distance`` and ``text-margin`` + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No margin will be used to detect if a text label is nearby a tile boundary.)* + +Minimum distance a text label will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all geometries no matter how small they are.)* + +Place labels only on polygons and lines with a bounding width longer than this value (in pixels). + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text is not rotated and is displayed upright.)* + +Rotate the text. (only works with text-placement:point). + +------------ + + +text-rotate-displacement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Label center is used for rotation.)* + +Rotates the displacement around the placement origin by the angle given by "orientation". + +------------ + + +text-upright +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``auto`` ``auto-down`` ``left`` ``right`` ``left-only`` ``right-only`` + + +Default Value: auto +*(Text will be positioned upright automatically.)* + +How this label should be placed along lines. By default when more than half of a label's characters are upside down the label is automatically flipped to keep it upright. By changing this parameter you can prevent this "auto-upright" behavior. The "auto-down" value places text in the opposite orientation to "auto". The "left" or "right" settings can be used to force text to always be placed along a line in a given direction and therefore disables flipping if text appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down text rather than trying to flip it. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point +*(One shield will be placed per geometry.)* + +How this label should be placed. Point placement places one label on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy +*(Alternative placements will not be enabled.)* + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No alternative placements will be used.)* + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``text-placements: "E,NE,SE,W,NW,SW";``. + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` ``reverse`` + + +Default Value: none +*(Transform text instance with specified function. Ignores map scale factor.)* + +Transform the case of the characters. + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` ``adjust`` + + +Default Value: auto +*(TODO.)* + +The text's horizontal alignment from it's centerpoint. If ``placement`` is set to ``line``, then ``adjust`` can be set to auto-fit the text to the length of the path by dynamically calculating ``character-spacing``. + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` ``auto`` + + +Default Value: auto +*(Auto alignment means that text will be centered by default except when using the ``placement-type`` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the ``text-placements`` directives.)* + +Define how text is justified. + +------------ + + +text-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +text-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify the geometries used for text placement by the given tolerance. + +------------ + + +text-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify the geometries used for text placement by the given algorithm. + +------------ + + +text-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out the angles of the geometry used for text placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +text-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +text-halo-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +text-font-feature-settings +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when ``character-spacing`` is greater than zero.)* + +Comma separated list of OpenType typographic features. The syntax and semantics conforms to ``font-feature-settings`` from W3C CSS. + +------------ + + +text-largest-bbox-only +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + +**Status: experimental** + + + + + +Default Value: true +*(For multipolygons only polygon with largest bbox area is labeled (does not apply to other geometries).)* + +Controls default labeling behavior on multipolygons. The default is true and means that only the polygon with largest bbox is labeled. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: The color gray will be used for fill. +*(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)* + +The color of the buildings fill. Note: 0.8 will be used to multiply each color component to auto-generate a darkened wall color. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Buildings will not have a visual height and will instead look like flat polygons.)* + +The height of the building in pixels. + +------------ + + + + +debug +^^^^^ + + +debug-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: collision +*(The otherwise invisible collision boxes will be rendered as squares on the map.)* + +The mode for debug rendering. + +------------ + + + + +dot +^^^ + + +dot-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: gray +*(The dot fill color is gray.)* + +The color of the area of the dot. + +------------ + + +dot-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The opacity of the dot.)* + +The overall opacity of the dot. + +------------ + + +dot-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The marker width is 1 pixel.)* + +The width of the dot in pixels. + +------------ + + +dot-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The marker height is 1 pixels.)* + +The height of the dot in pixels. + +------------ + + +dot-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current layer on top of other layers.)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + + + + diff --git a/docs/api/mapnik/3.0.3.rst b/docs/api/mapnik/3.0.3.rst new file mode 100644 index 000000000..54ea4cbd4 --- /dev/null +++ b/docs/api/mapnik/3.0.3.rst @@ -0,0 +1,3584 @@ +3.0.3 +----- + + +All elements +^^^^^^^^^^^^ + + +image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``color-blind-protanope`` ``color-blind-deuteranope`` ``color-blind-tritanope`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters.)* + +A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more ``image-filters`` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all ``image-filters`` have been applied. See ``direct-image-filters`` if you want to apply a filter directly to the main canvas. + +------------ + + +image-filters-inflate +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)* + +A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). + +------------ + + +direct-image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``color-blind-protanope`` ``color-blind-deuteranope`` ``color-blind-tritanope`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters.)* + +A list of image filters to apply to the main canvas (see the ``image-filters`` doc for how they work on a separate canvas). + +------------ + + +comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current layer on top of other layers.)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + +opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(No separate buffer will be used and no alpha will be applied to the style after rendering.)* + +An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). + +------------ + + + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(Will be rendered transparent.)* + +Map Background color. + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(No background image will be used.)* + +An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +background-image-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(The background-image will be blended with the background normally (placed on top of any existing background-color).)* + +Set the compositing operation used to blend the image into the background. + +------------ + + +background-image-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image opacity will not be changed when applied to the map background.)* + +Set the opacity of the image. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space.)* + +Map spatial reference (proj4 string). + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used.)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +maximum-extent +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34 +*(All data will be clipped to global mercator extent (default is applied in Carto.js).)* + +An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map. + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered.)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: The color gray will be used for fill. +*(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)* + +Fill color to assign to a polygon. + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the polygon. + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of polygon edges. + +------------ + + +polygon-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +polygon-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extend outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +polygon-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify geometries by the given tolerance. + +------------ + + +polygon-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify geometries by the given algorithm. + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform polygon geometry with specified function. + +------------ + + +polygon-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)* + +The color of a drawn line. + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The line will be rendered 1 pixel wide.)* + +The width of a line in pixels. + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of a line. + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``miter-revert`` ``round`` ``bevel`` + + +Default Value: miter +*(The line joins will be rendered using a miter look.)* + +The behavior of lines when joining. + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt +*(The line endings will be rendered using a butt look.)* + +The display of line endings. + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of stroke line. + +------------ + + +line-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(The line will be drawn without dashes.)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(The line will be drawn without dashes.)* + +Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). + +------------ + + +line-miterlimit +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 4 +*(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'.)* + +The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. + +------------ + + +line-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +line-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify geometries by the given tolerance. + +------------ + + +line-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify geometries by the given algorithm. + +------------ + + +line-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + +**Status: unstable** + + + + + +Default Value: 0 +*(Will not be offset.)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The line will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + +line-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform line geometry with specified function. + +------------ + + +line-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(An ellipse or circle, if width equals height.)* + +A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The stroke-opacity and fill-opacity of the marker.)* + +The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. + +------------ + + +marker-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The fill opacity of the marker. This property will also set the ``fill-opacity`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The marker will be drawn with a black outline.)* + +The color of the stroke around the marker. This property will also set the ``stroke`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 +*(The marker will be drawn with an outline of .5 pixels wide.)* + +The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. This property will also set the ``stroke-width`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque. This property will also set the ``stroke-opacity`` of elements in an SVG loaded from a file.)* + +The opacity of a line. + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``interior`` ``vertex-first`` ``vertex-last`` + + +Default Value: point +*(Place markers at the center point (centroid) of the geometry.)* + +Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons. + +------------ + + +marker-multi-policy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``each`` ``whole`` ``largest`` + + +Default Value: each +*(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)* + +A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + +**Status: deprecated** + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse +*(The marker shape is an ellipse.)* + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(The marker width is 10 pixels.)* + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(The marker height is 10 pixels.)* + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue +*(The marker fill color is blue.)* + +The color of the area of the marker. This property will also set the ``fill`` of elements in an SVG loaded from a file. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow markers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)* + +Avoid placing markers that intersect with tile boundaries. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache.)* + +Value to control whether the placement of the feature will prevent the placement of other features. + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 +*(In the case of marker-placement:line then draw a marker every 100 pixels along a line.)* + +Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. Any value less than 1 will be ignored and the default will be used instead. + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 +*(N/A: not intended to be changed.)* + +N/A: not intended to be changed. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform marker instance with specified function. Ignores map scale factor. + +------------ + + +marker-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +marker-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +marker-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +marker-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +marker-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform marker geometry with specified function. + +------------ + + +marker-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Will not be offset.)* + +Offsets a marker from a line a number of pixels parallel to its actual path. Positive values move the marker left, negative values move it right (relative to the directionality of the line). + +------------ + + +marker-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +marker-direction +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``auto`` ``auto-down`` ``left`` ``right`` ``left-only`` ``right-only`` ``up`` ``down`` + + +Default Value: right +*(Markers are oriented to the right in the line direction.)* + +How markers should be placed along lines. With the "auto" setting when marker is upside down the marker is automatically rotated by 180 degrees to keep it upright. The "auto-down" value places marker in the opposite orientation to "auto". The "left" or "right" settings can be used to force marker to always be placed along a line in a given direction and therefore disables rotating if marker appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down markers rather than trying to flip it. The "up" and "down" settings don't adjust marker's orientation to the line direction. + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No text label will be rendered with the shield.)* + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Font name and style to use for the shield text. + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image. + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(Font size of 10 will be used to render text.)* + +The size of the shield text in pixels. + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The shield text will be rendered black.)* + +The color of the shield text. + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point +*(One shield will be placed per geometry.)* + +How this shield should be placed. Point placement places one shield on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Shields will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)* + +Avoid placing shields that intersect with tile boundaries. + +------------ + + +shield-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow shields to overlap with other map elements already placed.)* + +Control whether overlapping shields are shown or hidden. + +------------ + + +shield-margin +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No extra margin will be used to determine if a shield collides with any other text, shield, or marker.)* + +Minimum distance that a shield can be placed from any other text, shield, or marker. + +------------ + + +shield-repeat-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shields with the same text will be rendered without restriction.)* + +Minimum distance between repeated shields. If set this will prevent shields being rendered nearby each other that contain the same text. Similar to shield-min-distance with the difference that it works the same no matter what placement strategy is used. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shields with the same text will be rendered without restriction.)* + +Minimum distance to the next shield with the same text. Only works for line placement. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Only one shield per line will attempt to be placed.)* + +Distance the renderer should use to try to place repeated shields on a line. + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No margin will be used to detect if a shield is nearby a tile boundary.)* + +Minimum distance a shield will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. + +------------ + + +shield-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: shield-spacing/2.0 +*(If a shield cannot be placed then the renderer will advance by shield-spacing/2.0 to try placement again.)* + +Allows the shield to be displaced from its ideal position by a number of pixels (only works with placement:line). + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Text will not be wrapped.)* + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +shield-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Wrapped lines will be a bit longer than wrap-width.)* + +Wrap text before wrap-width is reached. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " +*(Lines will be wrapped when whitespace is encountered.)* + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: white +*(The shield halo text will be rendered white.)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo.)* + +Specify the radius of the halo in pixels. + +------------ + + +shield-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The shield will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +shield-halo-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation.)* + +Transform shield halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. + +------------ + + +shield-halo-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +shield-halo-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text halo. + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(The default character spacing of the font will be used.)* + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default font spacing will be used.)* + +Vertical spacing between lines of multiline labels (in pixels). + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shield will not be displaced.)* + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shield will not be displaced.)* + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the image used for the shield. + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the text placed on top of the shield. + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto +*(TODO.)* + +The shield's horizontal alignment from its centerpoint. + +------------ + + +shield-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: middle +*(TODO.)* + +The shield's vertical alignment from its centerpoint. + +------------ + + +shield-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy +*(Alternative placements will not be enabled.)* + +Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. + +------------ + + +shield-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No alternative placements will be used.)* + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``shield-placements: "E,NE,SE,W,NW,SW";``. + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` ``reverse`` + + +Default Value: none +*(No text transformation will be applied.)* + +Transform the case of the characters. + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``center`` ``right`` ``auto`` + + +Default Value: auto +*(TODO.)* + +Define how text in a shield's label is justified. + +------------ + + +shield-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform shield instance with specified function. Ignores map scale factor. + +------------ + + +shield-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +shield-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify the geometries used for shield placement by the given tolerance. + +------------ + + +shield-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify the geometries used for shield placement by the given algorithm. + +------------ + + +shield-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out the angles of the geometry used for shield placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +shield-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +line-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +line-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications.)* + +Apply an opacity level to the image used for the pattern. + +------------ + + +line-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +line-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +line-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-pattern-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The line will not be offset.)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform line geometry with specified function and apply pattern to transformed geometry. + +------------ + + +line-pattern-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform line pattern instance with specified function. + +------------ + + +line-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``global`` ``local`` + + +Default Value: global +*(Patterns will be aligned to the map (or tile boundaries) when being repeated across polygons. This is ideal for seamless patterns in tiled rendering.)* + +Specify whether to align pattern fills to the layer's geometry (local) or to the map (global). + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of polygon pattern edges. + +------------ + + +polygon-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications.)* + +Apply an opacity level to the image used for the pattern. + +------------ + + +polygon-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +polygon-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +polygon-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +polygon-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform polygon geometry with specified function and apply pattern to transformed geometry. + +------------ + + +polygon-pattern-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform polygon pattern instance with specified function. + +------------ + + +polygon-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``near`` ``fast`` ``bilinear`` ``bicubic`` ``spline16`` ``spline36`` ``hanning`` ``hamming`` ``hermite`` ``kaiser`` ``quadric`` ``catrom`` ``gaussian`` ``bessel`` ``mitchell`` ``sinc`` ``lanczos`` ``blackman`` + + +Default Value: near +*(Nearest neighboor resampling will be used to scale the image to the target size of the map.)* + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image.)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + +raster-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +raster-colorizer-default-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``discrete`` ``linear`` ``exact`` + + +Default Value: linear +*(A linear interpolation is used to generate colors between the two nearest stops.)* + +This can be either ``discrete``, ``linear`` or ``exact``. If it is not specified then the default is ``linear``. + +------------ + + +raster-colorizer-default-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: transparent +*(Pixels that are not colored by the colorizer stops will be transparent.)* + +This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent. + +------------ + + +raster-colorizer-epsilon +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1.1920928955078125e-07 +*(Pixels must very closely match the stop filter otherwise they will not be colored.)* + +This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. + +------------ + + +raster-colorizer-stops +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``tags`` + + + + + +Default Value: +*(No colorization will happen without supplying stops.)* + +Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like ``stop(100,#fff,exact)``. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(A 4x4 black square will be rendered.)* + +Image file to represent a point. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache.)* + +Control whether the placement of the feature will prevent the placement of other features. + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A value from 0 to 1 to control the opacity of the point. + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid +*(The centroid of the geometry will be used to place the point.)* + +Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform point instance with specified function. Ignores map scale factor. + +------------ + + +point-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Value to use for a text label. Data columns are specified using brackets like [column_name]. + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Font name and style to render a label in. + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(Font size of 10 will be used to render text.)* + +Text size in pixels. + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(TODO.)* + +Define the amount of text (of the total) present on successive lines when wrapping occurs. + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Text will not be wrapped.)* + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +text-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Wrapped lines will be a bit longer than wrap-width.)* + +Wrap text before wrap-width is reached. + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " +*(Lines will be wrapped when whitespace is encountered.)* + +Use this character instead of a space to wrap long text. + +------------ + + +text-repeat-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + +**Status: unstable** + + + + + +Default Value: false +*(Character will be removed when used to wrap a line.)* + +Keep the character used to wrap a line instead of removing it, and repeat it on the new line. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Only one label per line will attempt to be placed.)* + +Distance the renderer should use to try to place repeated text labels on a line. + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default character spacing of the font will be used.)* + +Horizontal spacing adjustment between characters in pixels. This value is ignored when ``horizontal-alignment`` is set to ``adjust``. Typographic ligatures are turned off when this value is greater than zero. + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default font spacing will be used.)* + +Vertical spacing adjustment between lines in pixels. + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: text-spacing/2.0 +*(If a shield cannot be placed then the renderer will advance by text-spacing/2.0 to try placement again.)* + +Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 22.5 +*(The label will not be placed if a character falls on a line with an angle sharper than 22.5 degrees.)* + +The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The text will be rendered black.)* + +Specifies the color for the text. + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text. + +------------ + + +text-halo-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text halo. + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: white +*(The halo will be rendered white.)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo.)* + +Specify the radius of the halo in pixels. + +------------ + + +text-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The text will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +text-halo-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation.)* + +Transform text halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text by fixed amount, in pixels, +/- along the X axis. With "dummy" placement-type, a positive value displaces to the right. With "simple" placement-type, it is either left, right or unchanged, depending on the placement selected. Any non-zero value implies "horizontal-alignment" changes to "left" by default. Has no effect with 'line' text-placement-type. + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text by fixed amount, in pixels, +/- along the Y axis. With "dummy" placement-type, a positive value displaces downwards. With "simple" placement-type, it is either up, down or unchanged, depending on the placement selected. With "line" placement-type, a positive value displaces above the path. + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: auto +*(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Text will be potentially placed near tile edges and therefore may look cut off unless the same text label is rendered on each adjacent tile.)* + +Avoid placing labels that intersect with tile boundaries. + +------------ + + +text-margin +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No extra margin will be used to determine if a label collides with any other text, shield, or marker.)* + +Minimum distance that a label can be placed from any other text, shield, or marker. + +------------ + + +text-repeat-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Labels with the same text will be rendered without restriction.)* + +Minimum distance between repeated text. If set this will prevent text labels being rendered nearby each other that contain the same text. Similar to text-min-distance with the difference that it works the same no matter what placement strategy is used. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + +**Status: deprecated** + + + + + +Default Value: 0 +*(Labels with the same text will be rendered without restriction.)* + +Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by ``text-repeat-distance`` and ``text-margin`` + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No margin will be used to detect if a text label is nearby a tile boundary.)* + +Minimum distance a text label will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all geometries no matter how small they are.)* + +Place labels only on polygons and lines with a bounding width longer than this value (in pixels). + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text is not rotated and is displayed upright.)* + +Rotate the text. (only works with text-placement:point). + +------------ + + +text-rotate-displacement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Label center is used for rotation.)* + +Rotates the displacement around the placement origin by the angle given by "orientation". + +------------ + + +text-upright +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``auto`` ``auto-down`` ``left`` ``right`` ``left-only`` ``right-only`` + + +Default Value: auto +*(Text will be positioned upright automatically.)* + +How this label should be placed along lines. By default when more than half of a label's characters are upside down the label is automatically flipped to keep it upright. By changing this parameter you can prevent this "auto-upright" behavior. The "auto-down" value places text in the opposite orientation to "auto". The "left" or "right" settings can be used to force text to always be placed along a line in a given direction and therefore disables flipping if text appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down text rather than trying to flip it. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point +*(One shield will be placed per geometry.)* + +How this label should be placed. Point placement places one label on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy +*(Alternative placements will not be enabled.)* + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No alternative placements will be used.)* + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``text-placements: "E,NE,SE,W,NW,SW";``. + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` ``reverse`` + + +Default Value: none +*(Transform text instance with specified function. Ignores map scale factor.)* + +Transform the case of the characters. + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` ``adjust`` + + +Default Value: auto +*(TODO.)* + +The text's horizontal alignment from it's centerpoint. If ``placement`` is set to ``line``, then ``adjust`` can be set to auto-fit the text to the length of the path by dynamically calculating ``character-spacing``. + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` ``auto`` + + +Default Value: auto +*(Auto alignment means that text will be centered by default except when using the ``placement-type`` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the ``text-placements`` directives.)* + +Define how text is justified. + +------------ + + +text-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +text-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify the geometries used for text placement by the given tolerance. + +------------ + + +text-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify the geometries used for text placement by the given algorithm. + +------------ + + +text-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out the angles of the geometry used for text placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +text-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +text-halo-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +text-font-feature-settings +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when ``character-spacing`` is greater than zero.)* + +Comma separated list of OpenType typographic features. The syntax and semantics conforms to ``font-feature-settings`` from W3C CSS. + +------------ + + +text-largest-bbox-only +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + +**Status: experimental** + + + + + +Default Value: true +*(For multipolygons only polygon with largest bbox area is labeled (does not apply to other geometries).)* + +Controls default labeling behavior on multipolygons. The default is true and means that only the polygon with largest bbox is labeled. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: The color gray will be used for fill. +*(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)* + +The color of the buildings fill. Note: 0.8 will be used to multiply each color component to auto-generate a darkened wall color. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Buildings will not have a visual height and will instead look like flat polygons.)* + +The height of the building in pixels. + +------------ + + + + +debug +^^^^^ + + +debug-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: collision +*(The otherwise invisible collision boxes will be rendered as squares on the map.)* + +The mode for debug rendering. + +------------ + + + + +dot +^^^ + + +dot-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: gray +*(The dot fill color is gray.)* + +The color of the area of the dot. + +------------ + + +dot-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The opacity of the dot.)* + +The overall opacity of the dot. + +------------ + + +dot-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The marker width is 1 pixel.)* + +The width of the dot in pixels. + +------------ + + +dot-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The marker height is 1 pixels.)* + +The height of the dot in pixels. + +------------ + + +dot-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current layer on top of other layers.)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + + + + diff --git a/docs/api/mapnik/3.0.6.rst b/docs/api/mapnik/3.0.6.rst new file mode 100644 index 000000000..f3bd30fcf --- /dev/null +++ b/docs/api/mapnik/3.0.6.rst @@ -0,0 +1,3584 @@ +3.0.6 +----- + + +All elements +^^^^^^^^^^^^ + + +image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``color-blind-protanope`` ``color-blind-deuteranope`` ``color-blind-tritanope`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters.)* + +A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more ``image-filters`` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all ``image-filters`` have been applied. See ``direct-image-filters`` if you want to apply a filter directly to the main canvas. + +------------ + + +image-filters-inflate +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)* + +A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). + +------------ + + +direct-image-filters +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``agg-stack-blur`` ``emboss`` ``blur`` ``gray`` ``sobel`` ``edge-detect`` ``x-gradient`` ``y-gradient`` ``invert`` ``sharpen`` ``color-blind-protanope`` ``color-blind-deuteranope`` ``color-blind-tritanope`` ``colorize-alpha`` ``color-to-alpha`` ``scale-hsla`` + +Default Value: none +*(no filters.)* + +A list of image filters to apply to the main canvas (see the ``image-filters`` doc for how they work on a separate canvas). + +------------ + + +comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current layer on top of other layers.)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + +opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(No separate buffer will be used and no alpha will be applied to the style after rendering.)* + +An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). + +------------ + + + + +map +^^^ + + +background-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: none +*(Will be rendered transparent.)* + +Map Background color. + +------------ + + +background-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: +*(No background image will be used.)* + +An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +background-image-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(The background-image will be blended with the background normally (placed on top of any existing background-color).)* + +Set the compositing operation used to blend the image into the background. + +------------ + + +background-image-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image opacity will not be changed when applied to the map background.)* + +Set the opacity of the image. + +------------ + + +srs +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +*(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space.)* + +Map spatial reference (proj4 string). + +------------ + + +buffer-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No buffer will be used.)* + +Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". + +------------ + + +maximum-extent +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34 +*(All data will be clipped to global mercator extent (default is applied in Carto.js).)* + +An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map. + +------------ + + +base +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)* + +Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. + +------------ + + +font-directory +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(No map-specific fonts will be registered.)* + +Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). + +------------ + + + + +polygon +^^^^^^^ + + +polygon-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: The color gray will be used for fill. +*(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)* + +Fill color to assign to a polygon. + +------------ + + +polygon-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the polygon. + +------------ + + +polygon-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of polygon edges. + +------------ + + +polygon-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +polygon-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extend outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +polygon-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify geometries by the given tolerance. + +------------ + + +polygon-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify geometries by the given algorithm. + +------------ + + +polygon-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform polygon geometry with specified function. + +------------ + + +polygon-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line +^^^^ + + +line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)* + +The color of a drawn line. + +------------ + + +line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The line will be rendered 1 pixel wide.)* + +The width of a line in pixels. + +------------ + + +line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of a line. + +------------ + + +line-join +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``miter`` ``miter-revert`` ``round`` ``bevel`` + + +Default Value: miter +*(The line joins will be rendered using a miter look.)* + +The behavior of lines when joining. + +------------ + + +line-cap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``butt`` ``round`` ``square`` + + +Default Value: butt +*(The line endings will be rendered using a butt look.)* + +The display of line endings. + +------------ + + +line-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of stroke line. + +------------ + + +line-gamma-method +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``power`` ``linear`` ``none`` ``threshold`` ``multiply`` + + +Default Value: power +*(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)* + +An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. + +------------ + + +line-dasharray +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(The line will be drawn without dashes.)* + +A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. + +------------ + + +line-dash-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``numbers`` + + + + + +Default Value: none +*(The line will be drawn without dashes.)* + +Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). + +------------ + + +line-miterlimit +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 4 +*(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'.)* + +The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. + +------------ + + +line-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +line-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify geometries by the given tolerance. + +------------ + + +line-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify geometries by the given algorithm. + +------------ + + +line-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + +**Status: unstable** + + + + + +Default Value: 0 +*(Will not be offset.)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The line will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. + +------------ + + +line-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform line geometry with specified function. + +------------ + + +line-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +markers +^^^^^^^ + + +marker-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(An ellipse or circle, if width equals height.)* + +A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +marker-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The stroke-opacity and fill-opacity of the marker.)* + +The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. + +------------ + + +marker-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The fill opacity of the marker. This property will also set the ``fill-opacity`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The marker will be drawn with a black outline.)* + +The color of the stroke around the marker. This property will also set the ``stroke`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.5 +*(The marker will be drawn with an outline of .5 pixels wide.)* + +The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. This property will also set the ``stroke-width`` of elements in an SVG loaded from a file. + +------------ + + +marker-line-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque. This property will also set the ``stroke-opacity`` of elements in an SVG loaded from a file.)* + +The opacity of a line. + +------------ + + +marker-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``interior`` ``vertex-first`` ``vertex-last`` + + +Default Value: point +*(Place markers at the center point (centroid) of the geometry.)* + +Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons. + +------------ + + +marker-multi-policy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``each`` ``whole`` ``largest`` + + +Default Value: each +*(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)* + +A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). + +------------ + + +marker-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + +**Status: deprecated** + + +Possible values: ``arrow`` ``ellipse`` + + +Default Value: ellipse +*(The marker shape is an ellipse.)* + +The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). + +------------ + + +marker-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(The marker width is 10 pixels.)* + +The width of the marker, if using one of the default types. + +------------ + + +marker-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(The marker height is 10 pixels.)* + +The height of the marker, if using one of the default types. + +------------ + + +marker-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: blue +*(The marker fill color is blue.)* + +The color of the area of the marker. This property will also set the ``fill`` of elements in an SVG loaded from a file. + +------------ + + +marker-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow markers to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping markers are shown or hidden. + +------------ + + +marker-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)* + +Avoid placing markers that intersect with tile boundaries. + +------------ + + +marker-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache.)* + +Value to control whether the placement of the feature will prevent the placement of other features. + +------------ + + +marker-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 100 +*(In the case of marker-placement:line then draw a marker every 100 pixels along a line.)* + +Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. Any value less than 1 will be ignored and the default will be used instead. + +------------ + + +marker-max-error +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0.2 +*(N/A: not intended to be changed.)* + +N/A: not intended to be changed. + +------------ + + +marker-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform marker instance with specified function. Ignores map scale factor. + +------------ + + +marker-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +marker-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +marker-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +marker-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +marker-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform marker geometry with specified function. + +------------ + + +marker-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Will not be offset.)* + +Offsets a marker from a line a number of pixels parallel to its actual path. Positive values move the marker left, negative values move it right (relative to the directionality of the line). + +------------ + + +marker-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +marker-direction +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``auto`` ``auto-down`` ``left`` ``right`` ``left-only`` ``right-only`` ``up`` ``down`` + + +Default Value: right +*(Markers are oriented to the right in the line direction.)* + +How markers should be placed along lines. With the "auto" setting when marker is upside down the marker is automatically rotated by 180 degrees to keep it upright. The "auto-down" value places marker in the opposite orientation to "auto". The "left" or "right" settings can be used to force marker to always be placed along a line in a given direction and therefore disables rotating if marker appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down markers rather than trying to flip it. The "up" and "down" settings don't adjust marker's orientation to the line direction. + +------------ + + + + +shield +^^^^^^ + + +shield-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No text label will be rendered with the shield.)* + +Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. + +------------ + + +shield-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image file to render behind the shield text. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +shield-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Font name and style to use for the shield text. + +------------ + + +shield-unlock-image +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)* + +This parameter should be set to true if you are trying to position text beside rather than on top of the shield image. + +------------ + + +shield-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(Font size of 10 will be used to render text.)* + +The size of the shield text in pixels. + +------------ + + +shield-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The shield text will be rendered black.)* + +The color of the shield text. + +------------ + + +shield-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point +*(One shield will be placed per geometry.)* + +How this shield should be placed. Point placement places one shield on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. + +------------ + + +shield-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Shields will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)* + +Avoid placing shields that intersect with tile boundaries. + +------------ + + +shield-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow shields to overlap with other map elements already placed.)* + +Control whether overlapping shields are shown or hidden. + +------------ + + +shield-margin +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No extra margin will be used to determine if a shield collides with any other text, shield, or marker.)* + +Minimum distance that a shield can be placed from any other text, shield, or marker. + +------------ + + +shield-repeat-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shields with the same text will be rendered without restriction.)* + +Minimum distance between repeated shields. If set this will prevent shields being rendered nearby each other that contain the same text. Similar to shield-min-distance with the difference that it works the same no matter what placement strategy is used. + +------------ + + +shield-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shields with the same text will be rendered without restriction.)* + +Minimum distance to the next shield with the same text. Only works for line placement. + +------------ + + +shield-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Only one shield per line will attempt to be placed.)* + +Distance the renderer should use to try to place repeated shields on a line. + +------------ + + +shield-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No margin will be used to detect if a shield is nearby a tile boundary.)* + +Minimum distance a shield will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. + +------------ + + +shield-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: shield-spacing/2.0 +*(If a shield cannot be placed then the renderer will advance by shield-spacing/2.0 to try placement again.)* + +Allows the shield to be displaced from its ideal position by a number of pixels (only works with placement:line). + +------------ + + +shield-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Text will not be wrapped.)* + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +shield-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Wrapped lines will be a bit longer than wrap-width.)* + +Wrap text before wrap-width is reached. + +------------ + + +shield-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " +*(Lines will be wrapped when whitespace is encountered.)* + +Use this character instead of a space to wrap long names. + +------------ + + +shield-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: white +*(The shield halo text will be rendered white.)* + +Specifies the color of the halo around the text. + +------------ + + +shield-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo.)* + +Specify the radius of the halo in pixels. + +------------ + + +shield-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The shield will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +shield-halo-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation.)* + +Transform shield halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. + +------------ + + +shield-halo-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +shield-halo-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text halo. + +------------ + + +shield-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(The default character spacing of the font will be used.)* + +Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. + +------------ + + +shield-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default font spacing will be used.)* + +Vertical spacing between lines of multiline labels (in pixels). + +------------ + + +shield-text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. + +------------ + + +shield-text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. + +------------ + + +shield-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shield will not be displaced.)* + +Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. + +------------ + + +shield-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Shield will not be displaced.)* + +Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. + +------------ + + +shield-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the image used for the shield. + +------------ + + +shield-text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the text placed on top of the shield. + +------------ + + +shield-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` + + +Default Value: auto +*(TODO.)* + +The shield's horizontal alignment from its centerpoint. + +------------ + + +shield-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: middle +*(TODO.)* + +The shield's vertical alignment from its centerpoint. + +------------ + + +shield-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy +*(Alternative placements will not be enabled.)* + +Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. + +------------ + + +shield-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No alternative placements will be used.)* + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``shield-placements: "E,NE,SE,W,NW,SW";``. + +------------ + + +shield-text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` ``reverse`` + + +Default Value: none +*(No text transformation will be applied.)* + +Transform the case of the characters. + +------------ + + +shield-justify-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``center`` ``right`` ``auto`` + + +Default Value: auto +*(TODO.)* + +Define how text in a shield's label is justified. + +------------ + + +shield-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform shield instance with specified function. Ignores map scale factor. + +------------ + + +shield-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +shield-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify the geometries used for shield placement by the given tolerance. + +------------ + + +shield-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify the geometries used for shield placement by the given algorithm. + +------------ + + +shield-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out the angles of the geometry used for shield placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +shield-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +line-pattern +^^^^^^^^^^^^ + + +line-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +An image file to be repeated and warped along a line. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +line-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +line-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications.)* + +Apply an opacity level to the image used for the pattern. + +------------ + + +line-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +line-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +line-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +line-pattern-offset +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The line will not be offset.)* + +Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). + +------------ + + +line-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform line geometry with specified function and apply pattern to transformed geometry. + +------------ + + +line-pattern-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform line pattern instance with specified function. + +------------ + + +line-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +polygon-pattern +^^^^^^^^^^^^^^^ + + +polygon-pattern-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none + + +Image to use as a repeated pattern fill within a polygon. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +polygon-pattern-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``global`` ``local`` + + +Default Value: global +*(Patterns will be aligned to the map (or tile boundaries) when being repeated across polygons. This is ideal for seamless patterns in tiled rendering.)* + +Specify whether to align pattern fills to the layer's geometry (local) or to the map (global). + +------------ + + +polygon-pattern-gamma +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully antialiased.)* +Range: 0-1 +Level of antialiasing of polygon pattern edges. + +------------ + + +polygon-pattern-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The image is rendered without modifications.)* + +Apply an opacity level to the image used for the pattern. + +------------ + + +polygon-pattern-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +polygon-pattern-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +geometries are simplified by the given tolerance. + +------------ + + +polygon-pattern-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +geometries are simplified by the given algorithm. + +------------ + + +polygon-pattern-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +polygon-pattern-geometry-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(The geometry will not be transformed.)* + +Transform polygon geometry with specified function and apply pattern to transformed geometry. + +------------ + + +polygon-pattern-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform polygon pattern instance with specified function. + +------------ + + +polygon-pattern-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +raster +^^^^^^ + + +raster-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the raster symbolizer on top of other symbolizers. + +------------ + + +raster-filter-factor +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: -1 +*(Allow the datasource to choose appropriate downscaling.)* + +This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. + +------------ + + +raster-scaling +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``near`` ``fast`` ``bilinear`` ``bicubic`` ``spline16`` ``spline36`` ``hanning`` ``hamming`` ``hermite`` ``kaiser`` ``quadric`` ``catrom`` ``gaussian`` ``bessel`` ``mitchell`` ``sinc`` ``lanczos`` ``blackman`` + + +Default Value: near +*(Nearest neighboor resampling will be used to scale the image to the target size of the map.)* + +The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. + +------------ + + +raster-mesh-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 16 +*(Reprojection mesh will be 1/16 of the resolution of the source image.)* + +A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. + +------------ + + +raster-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +raster-colorizer-default-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``discrete`` ``linear`` ``exact`` + + +Default Value: linear +*(A linear interpolation is used to generate colors between the two nearest stops.)* + +This can be either ``discrete``, ``linear`` or ``exact``. If it is not specified then the default is ``linear``. + +------------ + + +raster-colorizer-default-color +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: transparent +*(Pixels that are not colored by the colorizer stops will be transparent.)* + +This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent. + +------------ + + +raster-colorizer-epsilon +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1.1920928955078125e-07 +*(Pixels must very closely match the stop filter otherwise they will not be colored.)* + +This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. + +------------ + + +raster-colorizer-stops +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``tags`` + + + + + +Default Value: +*(No colorization will happen without supplying stops.)* + +Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like ``stop(100,#fff,exact)``. + +------------ + + + + +point +^^^^^ + + +point-file +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``uri`` + + + + + +Default Value: none +*(A 4x4 black square will be rendered.)* + +Image file to represent a point. Accepted formats: svg, jpg, png, tiff, and webp. + +------------ + + +point-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow points to overlap with each other - overlapping markers will not be shown.)* + +Control whether overlapping points are shown or hidden. + +------------ + + +point-ignore-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(do not store the bbox of this geometry in the collision detector cache.)* + +Control whether the placement of the feature will prevent the placement of other features. + +------------ + + +point-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A value from 0 to 1 to control the opacity of the point. + +------------ + + +point-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``centroid`` ``interior`` + + +Default Value: centroid +*(The centroid of the geometry will be used to place the point.)* + +Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. + +------------ + + +point-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: none +*(No transformation.)* + +Transform point instance with specified function. Ignores map scale factor. + +------------ + + +point-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + + + +text +^^^^ + + +text-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Value to use for a text label. Data columns are specified using brackets like [column_name]. + +------------ + + +text-face-name +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: none + + +Font name and style to render a label in. + +------------ + + +text-size +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 10 +*(Font size of 10 will be used to render text.)* + +Text size in pixels. + +------------ + + +text-ratio +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(TODO.)* + +Define the amount of text (of the total) present on successive lines when wrapping occurs. + +------------ + + +text-wrap-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Text will not be wrapped.)* + +Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. + +------------ + + +text-wrap-before +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Wrapped lines will be a bit longer than wrap-width.)* + +Wrap text before wrap-width is reached. + +------------ + + +text-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: " " +*(Lines will be wrapped when whitespace is encountered.)* + +Use this character instead of a space to wrap long text. + +------------ + + +text-repeat-wrap-character +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + +**Status: unstable** + + + + + +Default Value: false +*(Character will be removed when used to wrap a line.)* + +Keep the character used to wrap a line instead of removing it, and repeat it on the new line. + +------------ + + +text-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``unsigned`` + + + + + +Default Value: 0 +*(Only one label per line will attempt to be placed.)* + +Distance the renderer should use to try to place repeated text labels on a line. + +------------ + + +text-character-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default character spacing of the font will be used.)* + +Horizontal spacing adjustment between characters in pixels. This value is ignored when ``horizontal-alignment`` is set to ``adjust``. Typographic ligatures are turned off when this value is greater than zero. + +------------ + + +text-line-spacing +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(The default font spacing will be used.)* + +Vertical spacing adjustment between lines in pixels. + +------------ + + +text-label-position-tolerance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: text-spacing/2.0 +*(If a shield cannot be placed then the renderer will advance by text-spacing/2.0 to try placement again.)* + +Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). + +------------ + + +text-max-char-angle-delta +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 22.5 +*(The label will not be placed if a character falls on a line with an angle sharper than 22.5 degrees.)* + +The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. + +------------ + + +text-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: black +*(The text will be rendered black.)* + +Specifies the color for the text. + +------------ + + +text-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text. + +------------ + + +text-halo-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Fully opaque.)* + +A number from 0 to 1 specifying the opacity for the text halo. + +------------ + + +text-halo-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: white +*(The halo will be rendered white.)* + +Specifies the color of the halo around the text. + +------------ + + +text-halo-radius +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(no halo.)* + +Specify the radius of the halo in pixels. + +------------ + + +text-halo-rasterizer +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``full`` ``fast`` + + +Default Value: full +*(The text will be rendered using the highest quality method rather than the fastest.)* + +Exposes an alternate text halo rendering method that sacrifices quality for speed. + +------------ + + +text-halo-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``functions`` + + + +Possible values: ``matrix`` ``translate`` ``scale`` ``rotate`` ``skewX`` ``skewY`` + +Default Value: +*(No transformation.)* + +Transform text halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. + +------------ + + +text-dx +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text by fixed amount, in pixels, +/- along the X axis. With "dummy" placement-type, a positive value displaces to the right. With "simple" placement-type, it is either left, right or unchanged, depending on the placement selected. Any non-zero value implies "horizontal-alignment" changes to "left" by default. Has no effect with 'line' text-placement-type. + +------------ + + +text-dy +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text will not be displaced.)* + +Displace text by fixed amount, in pixels, +/- along the Y axis. With "dummy" placement-type, a positive value displaces downwards. With "simple" placement-type, it is either up, down or unchanged, depending on the placement selected. With "line" placement-type, a positive value displaces above the path. + +------------ + + +text-vertical-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``top`` ``middle`` ``bottom`` ``auto`` + + +Default Value: auto +*(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)* + +Position of label relative to point position. + +------------ + + +text-avoid-edges +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Text will be potentially placed near tile edges and therefore may look cut off unless the same text label is rendered on each adjacent tile.)* + +Avoid placing labels that intersect with tile boundaries. + +------------ + + +text-margin +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No extra margin will be used to determine if a label collides with any other text, shield, or marker.)* + +Minimum distance that a label can be placed from any other text, shield, or marker. + +------------ + + +text-repeat-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Labels with the same text will be rendered without restriction.)* + +Minimum distance between repeated text. If set this will prevent text labels being rendered nearby each other that contain the same text. Similar to text-min-distance with the difference that it works the same no matter what placement strategy is used. + +------------ + + +text-min-distance +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + +**Status: deprecated** + + + + + +Default Value: 0 +*(Labels with the same text will be rendered without restriction.)* + +Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by ``text-repeat-distance`` and ``text-margin`` + +------------ + + +text-min-padding +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No margin will be used to detect if a text label is nearby a tile boundary.)* + +Minimum distance a text label will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. + +------------ + + +text-min-path-length +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(place labels on all geometries no matter how small they are.)* + +Place labels only on polygons and lines with a bounding width longer than this value (in pixels). + +------------ + + +text-allow-overlap +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Do not allow text to overlap with other text - overlapping markers will not be shown.)* + +Control whether overlapping text is shown or hidden. + +------------ + + +text-orientation +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Text is not rotated and is displayed upright.)* + +Rotate the text. (only works with text-placement:point). + +------------ + + +text-rotate-displacement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(Label center is used for rotation.)* + +Rotates the displacement around the placement origin by the angle given by "orientation". + +------------ + + +text-upright +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``auto`` ``auto-down`` ``left`` ``right`` ``left-only`` ``right-only`` + + +Default Value: auto +*(Text will be positioned upright automatically.)* + +How this label should be placed along lines. By default when more than half of a label's characters are upside down the label is automatically flipped to keep it upright. By changing this parameter you can prevent this "auto-upright" behavior. The "auto-down" value places text in the opposite orientation to "auto". The "left" or "right" settings can be used to force text to always be placed along a line in a given direction and therefore disables flipping if text appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down text rather than trying to flip it. + +------------ + + +text-placement +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``point`` ``line`` ``vertex`` ``interior`` + + +Default Value: point +*(One shield will be placed per geometry.)* + +How this label should be placed. Point placement places one label on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. + +------------ + + +text-placement-type +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``dummy`` ``simple`` ``list`` + + +Default Value: dummy +*(Alternative placements will not be enabled.)* + +Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. + +------------ + + +text-placements +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(No alternative placements will be used.)* + +If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is ``text-placements: "E,NE,SE,W,NW,SW";``. + +------------ + + +text-transform +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``none`` ``uppercase`` ``lowercase`` ``capitalize`` ``reverse`` + + +Default Value: none +*(Transform text instance with specified function. Ignores map scale factor.)* + +Transform the case of the characters. + +------------ + + +text-horizontal-alignment +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``middle`` ``right`` ``auto`` ``adjust`` + + +Default Value: auto +*(TODO.)* + +The text's horizontal alignment from it's centerpoint. If ``placement`` is set to ``line``, then ``adjust`` can be set to auto-fit the text to the length of the path by dynamically calculating ``character-spacing``. + +------------ + + +text-align +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``left`` ``right`` ``center`` ``auto`` + + +Default Value: auto +*(Auto alignment means that text will be centered by default except when using the ``placement-type`` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the ``text-placements`` directives.)* + +Define how text is justified. + +------------ + + +text-clip +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + + + + + +Default Value: false +*(The geometry will not be clipped to map bounds before rendering.)* + +Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. + +------------ + + +text-simplify +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(geometry will not be simplified.)* + +Simplify the geometries used for text placement by the given tolerance. + +------------ + + +text-simplify-algorithm +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``radial-distance`` ``zhao-saalfeld`` ``visvalingam-whyatt`` + + +Default Value: radial-distance +*(The geometry will be simplified using the radial distance algorithm.)* + +Simplify the geometries used for text placement by the given algorithm. + +------------ + + +text-smooth +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(No smoothing.)* +Range: 0-1 +Smooths out the angles of the geometry used for text placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. + +------------ + + +text-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +text-halo-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current symbolizer on top of other symbolizer.)* + +Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. + +------------ + + +text-font-feature-settings +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: +*(Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when ``character-spacing`` is greater than zero.)* + +Comma separated list of OpenType typographic features. The syntax and semantics conforms to ``font-feature-settings`` from W3C CSS. + +------------ + + +text-largest-bbox-only +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``boolean`` + +**Status: experimental** + + + + + +Default Value: true +*(For multipolygons only polygon with largest bbox area is labeled (does not apply to other geometries).)* + +Controls default labeling behavior on multipolygons. The default is true and means that only the polygon with largest bbox is labeled. + +------------ + + + + +building +^^^^^^^^ + + +building-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: The color gray will be used for fill. +*(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)* + +The color of the buildings fill. Note: 0.8 will be used to multiply each color component to auto-generate a darkened wall color. + +------------ + + +building-fill-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(Color is fully opaque.)* + +The opacity of the building as a whole, including all walls. + +------------ + + +building-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 0 +*(Buildings will not have a visual height and will instead look like flat polygons.)* + +The height of the building in pixels. + +------------ + + + + +debug +^^^^^ + + +debug-mode +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``string`` + + + + + +Default Value: collision +*(The otherwise invisible collision boxes will be rendered as squares on the map.)* + +The mode for debug rendering. + +------------ + + + + +dot +^^^ + + +dot-fill +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``color`` + + + + + +Default Value: gray +*(The dot fill color is gray.)* + +The color of the area of the dot. + +------------ + + +dot-opacity +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The opacity of the dot.)* + +The overall opacity of the dot. + +------------ + + +dot-width +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The marker width is 1 pixel.)* + +The width of the dot in pixels. + +------------ + + +dot-height +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``float`` + + + + + +Default Value: 1 +*(The marker height is 1 pixels.)* + +The height of the dot in pixels. + +------------ + + +dot-comp-op +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: ``keyword`` + + +Possible values: ``clear`` ``src`` ``dst`` ``src-over`` ``dst-over`` ``src-in`` ``dst-in`` ``src-out`` ``dst-out`` ``src-atop`` ``dst-atop`` ``xor`` ``plus`` ``minus`` ``multiply`` ``divide`` ``screen`` ``overlay`` ``darken`` ``lighten`` ``color-dodge`` ``color-burn`` ``linear-dodge`` ``linear-burn`` ``hard-light`` ``soft-light`` ``difference`` ``exclusion`` ``contrast`` ``invert`` ``invert-rgb`` ``grain-merge`` ``grain-extract`` ``hue`` ``saturation`` ``color`` ``value`` + + +Default Value: src-over +*(Add the current layer on top of other layers.)* + +Composite operation. This defines how this layer should behave relative to layers atop or below it. + +------------ + + + + + diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 000000000..91db25afd --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +# +# carto documentation build configuration file, created by +# sphinx-quickstart on Sun Feb 5 10:57:37 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + +import sphinx_rtd_theme + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'carto' +copyright = u'2017, Carto contributors' +author = u'Carto contributors' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = u'' +# The full version, including alpha/beta/rc tags. +release = u'' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "sphinx_rtd_theme" + +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'cartodoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'carto.tex', u'carto Documentation', + u'Carto contributors', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'carto', u'carto Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'carto', u'carto Documentation', + author, 'carto', 'One line description of project.', + 'Miscellaneous'), +] diff --git a/docs/generate.js b/docs/generate.js new file mode 100644 index 000000000..1d830220a --- /dev/null +++ b/docs/generate.js @@ -0,0 +1,37 @@ +var fs = require('fs'), + path = require('path'), + refs = require('mapnik-reference'), + _ = require('lodash'); + +function tmpl(x) { + return _.template(fs.readFileSync(path.join(__dirname, x), 'utf-8')); +} + +function substituteReSt(str) { + str = str.replace(/\`/g, '``'); + + return str; +} + +var index = tmpl('mapnik_api._'), + table = tmpl('symbolizers._'), + versions = []; + +refs.versions.forEach(function (v) { + var ref = refs.load(v), + output = ''; + + output += v + '\n' + Array(v.length + 1).join('-') + '\n'; + output += table({ + symbolizers: ref.symbolizers, + subst: substituteReSt, + _: _ + }); + output += '\n\n'; + + versions.push('.. include:: api/mapnik/' + v + '.rst'); + + fs.writeFileSync(path.join(__dirname, 'api/mapnik/' + v + '.rst'), output); +}); + +fs.writeFileSync(path.join(__dirname, 'mapnik_api.rst'), index({versions: versions.reverse().join('\n')})); diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 000000000..c94d067da --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,18 @@ +CartoCSS +================================== + +CartoCSS (short: Carto) is a language for map design. It is similar in syntax to CSS, but builds upon it with specific abilities to +filter map data and by providing things like variables. It targets the `Mapnik renderer `_ and is able to generate Mapnik XML. +It can run from the command line or in the browser by using a bundler like Browserify. + +Carto is an evolution of the `Cascadenik `_ idea and language, with an emphasis on speed and flexibility. + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + installation_usage + language_elements + styling_concepts + mml + mapnik_api diff --git a/docs/installation_usage.rst b/docs/installation_usage.rst new file mode 100644 index 000000000..2cdb7541b --- /dev/null +++ b/docs/installation_usage.rst @@ -0,0 +1,82 @@ +Installation & Usage +==================== + +Installation +------------ + +If you are using a map design application like Kosmtik, Mapbox Studio Classic or Tilemill you already have CartoCSS installed +and might be more interested in the language reference. + +Else you can install the *carto* binary with NPM by running:: + + npm install -g carto + +You should consider using a Node.js version manager like `NVM `_. + +Optionally you may also want to install millstone which is required for resolving data in the same way as Mapbox Studio Classic does:: + + npm install -g millstone + + +Having *millstone* installed specifically enables support for localizing external resources (URLs and local files) referenced in your MML file, +and detecting projections (using `node-srs `_). + +Usage +----- + +Now that Carto is installed you should have a *carto* command line tool available that can be run on a CartoCSS project:: + + carto project.mml > mapnik.xml + +The following command line options are available: + +-a / --api VERSION + Specify Mapnik API version (e.g. --api 3.0.10) (default: latest Mapnik API version) + +-b / --benchmark + Outputs total compile time + +-h / --help + Display help message + +-l / --localize + Use millstone to localize resources when loading an MML (default: off) + +-n / --nosymlink + Use absolute paths instead of symlinking files + +-ppi RESOLUTION + Pixels per inch used to convert m, mm, cm, in, pt, pc to pixels (default: 90.714) + +-v / --version + Display version information + + +Alternatively, Carto can be used from JavaScript. The *Renderer* interface is the main API for developers, +and it takes an MML file as a string as input. :: + + // defined variables: + // - input (the name or identifier of the file being parsed) + var carto = require('carto'); + + try { + var data = fs.readFileSync(input, 'utf-8'); + var mml = new carto.MML(); + mml.load(path.dirname(input), data, function (err, data) { + if (err) throw err; + var output = new carto.Renderer({ + filename: input, + local_data_dir: path.dirname(input), + }).render(data); + console.log(output); + }); + } catch(err) { + if (Array.isArray(err)) { + err.forEach(function(e) { + carto.writeError(e, options); + }); + } else { throw err; } + } + +.. note:: If you want to use Carto within the browser you should not use MML loading via ``carto.MML.load``. + Instead you should supply the JSON of the MML including the Stylesheet strings directly to ``carto.Renderer.render``. diff --git a/docs/language_elements.rst b/docs/language_elements.rst new file mode 100644 index 000000000..1563b74fa --- /dev/null +++ b/docs/language_elements.rst @@ -0,0 +1,173 @@ +Language Elements +================= + +Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. + +Color +----- + +CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva. +It also supports the predefined HTML colors names, like `yellow` and `blue`. :: + + #line { + line-color: #ff0; + line-color: #ffff00; + line-color: rgb(255, 255, 0); + line-color: rgba(255, 255, 0, 1); + line-color: hsl(100, 50%, 50%); + line-color: hsla(100, 50%, 50%, 1); + line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL + line-color: hsluva(100, 50%, 50%, 1); + line-color: yellow; + } + +Especially of note is the support for HSL and HSLuv, which can be easier to reason about than RGB. +CartoCSS also includes several color operation functions `borrowed from LessCSS `_:: + + // lighten and darken colors + lighten(#ace, 10%); + darken(#ace, 10%); + + // saturate and desaturate + saturate(#550000, 10%); + desaturate(#00ff00, 10%); + + // increase or decrease the opacity of a color + fadein(#fafafa, 10%); + fadeout(#fefefe, 14%); + + // spin rotates a color around the color wheel by degrees + spin(#ff00ff, 10); + + // mix generates a color in between two other colors. + mix(#fff, #000, 50%); + + // get color components + hue(#ff00ff); + saturation(#ff00ff); + lightness(#ff00ff); + alpha(hsla(100, 50%, 50%, 0.5)); + +These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. +All the above mentioned functions also come in a *functionp*-variant (e.g. ``lightenp``), which force a given color into HSLuv color space. + +Float +----- + +Float is a fancy way of saying 'number'. In CartoCSS, you specify *just a number* - unlike CSS, there are no units, +but everything is specified in pixels. :: + + #line { + line-width: 2; + } + +It's also possible to do simple math with number values:: + + #line { + line-width: 4 / 2; // division + line-width: 4 + 2; // addition + line-width: 4 - 2; // subtraction + line-width: 4 * 2; // multiplication + line-width: 4 % 2; // modulus + } + +URI +--- + +URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of ``url('place.png')`` +notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. +URIs can be paths to places on your computer, or on the internet. :: + + #markers { + marker-file: url('marker.png'); + } + +String +------ + +A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, +though pay attention to the cases of ``text-name`` and ``shield-name`` - they actually will refer to features, +which you refer to by putting them in brackets, as seen in the example below. :: + + #labels { + text-name: "[MY_FIELD]"; + } + +Boolean +------- + +Boolean means yes or no, so it accepts the values ``true`` or ``false``. :: + + #markers { + marker-allow-overlap: true; + } + +Expressions +----------- + +Expressions are statements that can include fields, numbers, and other types in a really flexible way. +You have run into expressions before, in the realm of 'fields', where you'd specify ``"[FIELD]"``, +but expressions allow you to drop the quotes and also do quick addition, division, multiplication, +and concatenation from within CartoCSS syntax. :: + + #buildings { + building-height: [HEIGHT_FIELD] * 10; + } + +Numbers +------- + +Numbers are comma-separated lists of one or more number in a specific order. +They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. :: + + #disputedboundary { + line-dasharray: 1, 4, 2; + } + +Percentages +----------- + +In CartoCSS, the percentage symbol, ``%`` universally means ``value/100``. +It's meant to be used with ratio-related properties, like opacity rules. + +.. attention:: You should not use percentages as widths, heights, or other properties - unlike CSS, + percentages are not relative to cascaded classes or page size, they're, as stated, + simply the value divided by one hundred. + +In an example:: + + #world { + // this syntax + polygon-opacity: 50%; + + // is equivalent to + polygon-opacity: 0.5; + } + +Functions +--------- + +Functions are comma-separated lists of one or more functions. For instance, transforms use the ``functions`` type +to allow for transforms within CartoCSS, which are optionally chainable. :: + + #point { + point-transform: scale(2, 2); + } + +Mapnik Render-Time Variables +---------------------------- + +Mapnik >= 3.0.0 supports variables of the form ``@var``. These can be used from CartoCSS by specifying them as strings. For example:: + + #layer { + line-width: '@zoom'; + } + +For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form ``variable_name:variable_value``. + +Resetting properties +-------------------- + +You can reset properties by specifying them with the keyword ``none``. They will then be removed from the symbolizer thus using their default value +or not using them at all. This does not work or makes sense for all properties like e.g. not for ``text-face-name``. For an overview over properties +where this works or makes sense see `this list `_. diff --git a/docs/latest.md b/docs/latest.md deleted file mode 100644 index 36510ce7f..000000000 --- a/docs/latest.md +++ /dev/null @@ -1,2479 +0,0 @@ -# Carto documentation - -The following is a list of properties provided in CartoCSS that you can apply to map elements. - -## All elements - -##### image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `color-blind-protanope` `color-blind-deuteranope` `color-blind-tritanope` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more `image-filters` will trigger a new canvas to be created before starting to render a style and then this canvas will be composited back into the main canvas after rendering all features and after all `image-filters` have been applied. See `direct-image-filters` if you want to apply a filter directly to the main canvas. -* * * - -##### image-filters-inflate `boolean` - - - - -Default Value: false -_(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)_ - -A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data). -* * * - -##### direct-image-filters `functions` - - -`agg-stack-blur` `emboss` `blur` `gray` `sobel` `edge-detect` `x-gradient` `y-gradient` `invert` `sharpen` `color-blind-protanope` `color-blind-deuteranope` `color-blind-tritanope` `colorize-alpha` `color-to-alpha` `scale-hsla` - -Default Value: none -_(no filters.)_ - -A list of image filters to apply to the main canvas (see the `image-filters` doc for how they work on a separate canvas). -* * * - -##### comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - -##### opacity `float` - - - - -Default Value: 1 -_(No separate buffer will be used and no alpha will be applied to the style after rendering.)_ - -An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer). -* * * - - -## map - -##### background-color `color` - - - - -Default Value: none -_(Will be rendered transparent.)_ - -Map Background color. -* * * - -##### background-image `uri` - - - - -Default Value: -_(No background image will be used.)_ - -An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### background-image-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(The background-image will be blended with the background normally (placed on top of any existing background-color).)_ - -Set the compositing operation used to blend the image into the background. -* * * - -##### background-image-opacity `float` - - - - -Default Value: 1 -_(The image opacity will not be changed when applied to the map background.)_ - -Set the opacity of the image. -* * * - -##### srs `string` - - - - -Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs -_(The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space.)_ - -Map spatial reference (proj4 string). -* * * - -##### buffer-size `float` - - - - -Default Value: 0 -_(No buffer will be used.)_ - -Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges". -* * * - -##### maximum-extent `string` - - - - -Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34 -_(All data will be clipped to global mercator extent (default is applied in Carto.js).)_ - -An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map. -* * * - -##### base `string` - - - - -Default Value: -_(This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.)_ - -Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet. -* * * - -##### font-directory `uri` - - - - -Default Value: none -_(No map-specific fonts will be registered.)_ - -Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered). -* * * - - -## polygon - -##### polygon-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -Fill color to assign to a polygon. -* * * - -##### polygon-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the polygon. -* * * - -##### polygon-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon edges. -* * * - -##### polygon-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### polygon-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extend outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### polygon-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### polygon-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function. -* * * - -##### polygon-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line - -##### line-color `color` - - - - -Default Value: black -_(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)_ - -The color of a drawn line. -* * * - -##### line-width `float` - - - - -Default Value: 1 -_(The line will be rendered 1 pixel wide.)_ - -The width of a line in pixels. -* * * - -##### line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of a line. -* * * - -##### line-join `keyword` - -`miter` `miter-revert` `round` `bevel` - - -Default Value: miter -_(The line joins will be rendered using a miter look.)_ - -The behavior of lines when joining. -* * * - -##### line-cap `keyword` - -`butt` `round` `square` - - -Default Value: butt -_(The line endings will be rendered using a butt look.)_ - -The display of line endings. -* * * - -##### line-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of stroke line. -* * * - -##### line-gamma-method `keyword` - -`power` `linear` `none` `threshold` `multiply` - - -Default Value: power -_(pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA.)_ - -An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions. -* * * - -##### line-dasharray `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns. -* * * - -##### line-dash-offset `numbers` - - - - -Default Value: none -_(The line will be drawn without dashes.)_ - -Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled). -* * * - -##### line-miterlimit `float` - - - - -Default Value: 4 -_(Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'.)_ - -The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts. -* * * - -##### line-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify geometries by the given tolerance. -* * * - -##### line-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify geometries by the given algorithm. -* * * - -##### line-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-offset `float` -Status: *unstable* - - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The line will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate AGG rendering method that sacrifices some accuracy for speed. -* * * - -##### line-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function. -* * * - -##### line-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## markers - -##### marker-file `uri` - - - - -Default Value: none -_(An ellipse or circle, if width equals height.)_ - -A file that this marker shows at each placement. If no file is given, the marker will show an ellipse. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### marker-opacity `float` - - - - -Default Value: 1 -_(The stroke-opacity and fill-opacity of the marker.)_ - -The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke. -* * * - -##### marker-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The fill opacity of the marker. This property will also set the `fill-opacity` of elements in an SVG loaded from a file. -* * * - -##### marker-line-color `color` - - - - -Default Value: black -_(The marker will be drawn with a black outline.)_ - -The color of the stroke around the marker. This property will also set the `stroke` of elements in an SVG loaded from a file. -* * * - -##### marker-line-width `float` - - - - -Default Value: 0.5 -_(The marker will be drawn with an outline of .5 pixels wide.)_ - -The width of the stroke around the marker, in pixels. This is positioned on the boundary, so high values can cover the area itself. This property will also set the `stroke-width` of elements in an SVG loaded from a file. -* * * - -##### marker-line-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque. This property will also set the `stroke-opacity` of elements in an SVG loaded from a file.)_ - -The opacity of a line. -* * * - -##### marker-placement `keyword` - -`point` `line` `interior` `vertex-first` `vertex-last` - - -Default Value: point -_(Place markers at the center point (centroid) of the geometry.)_ - -Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior. The 'vertex-first' and 'vertex-last' options can be used to place markers at the first or last vertex of lines or polygons. -* * * - -##### marker-multi-policy `keyword` - -`each` `whole` `largest` - - -Default Value: each -_(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)_ - -A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default). -* * * - -##### marker-type `keyword` -Status: *deprecated* - - -`arrow` `ellipse` - - -Default Value: ellipse -_(The marker shape is an ellipse.)_ - -The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width). -* * * - -##### marker-width `float` - - - - -Default Value: 10 -_(The marker width is 10 pixels.)_ - -The width of the marker, if using one of the default types. -* * * - -##### marker-height `float` - - - - -Default Value: 10 -_(The marker height is 10 pixels.)_ - -The height of the marker, if using one of the default types. -* * * - -##### marker-fill `color` - - - - -Default Value: blue -_(The marker fill color is blue.)_ - -The color of the area of the marker. This property will also set the `fill` of elements in an SVG loaded from a file. -* * * - -##### marker-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow markers to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping markers are shown or hidden. -* * * - -##### marker-avoid-edges `boolean` - - - - -Default Value: false -_(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing markers that intersect with tile boundaries. -* * * - -##### marker-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Value to control whether the placement of the feature will prevent the placement of other features. -* * * - -##### marker-spacing `float` - - - - -Default Value: 100 -_(In the case of marker-placement:line then draw a marker every 100 pixels along a line.)_ - -Space between repeated markers in pixels. If the spacing is less than the marker size or larger than the line segment length then no marker will be placed. Any value less than 1 will be ignored and the default will be used instead. -* * * - -##### marker-max-error `float` - - - - -Default Value: 0.2 -_(N/A: not intended to be changed.)_ - -N/A: not intended to be changed. -* * * - -##### marker-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform marker instance with specified function. Ignores map scale factor. -* * * - -##### marker-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### marker-simplify `float` - - - - -Default Value: 0 -_(Geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### marker-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### marker-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### marker-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform marker geometry with specified function. -* * * - -##### marker-offset `float` - - - - -Default Value: 0 -_(Will not be offset.)_ - -Offsets a marker from a line a number of pixels parallel to its actual path. Positive values move the marker left, negative values move it right (relative to the directionality of the line). -* * * - -##### marker-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### marker-direction `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` `up` `down` - - -Default Value: right -_(Markers are oriented to the right in the line direction.)_ - -How markers should be placed along lines. With the "auto" setting when marker is upside down the marker is automatically rotated by 180 degrees to keep it upright. The "auto-down" value places marker in the opposite orientation to "auto". The "left" or "right" settings can be used to force marker to always be placed along a line in a given direction and therefore disables rotating if marker appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down markers rather than trying to flip it. The "up" and "down" settings don't adjust marker's orientation to the line direction. -* * * - - -## shield - -##### shield-name `string` - - - - -Default Value: -_(No text label will be rendered with the shield.)_ - -Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]. -* * * - -##### shield-file `uri` - - - - -Default Value: none - - -Image file to render behind the shield text. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### shield-face-name `string` - - - - -Default Value: none - - -Font name and style to use for the shield text. -* * * - -##### shield-unlock-image `boolean` - - - - -Default Value: false -_(text alignment relative to the shield image uses the center of the image as the anchor for text positioning.)_ - -This parameter should be set to true if you are trying to position text beside rather than on top of the shield image. -* * * - -##### shield-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -The size of the shield text in pixels. -* * * - -##### shield-fill `color` - - - - -Default Value: black -_(The shield text will be rendered black.)_ - -The color of the shield text. -* * * - -##### shield-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this shield should be placed. Point placement places one shield on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### shield-avoid-edges `boolean` - - - - -Default Value: false -_(Shields will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)_ - -Avoid placing shields that intersect with tile boundaries. -* * * - -##### shield-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow shields to overlap with other map elements already placed.)_ - -Control whether overlapping shields are shown or hidden. -* * * - -##### shield-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a shield collides with any other text, shield, or marker.)_ - -Minimum distance that a shield can be placed from any other text, shield, or marker. -* * * - -##### shield-repeat-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance between repeated shields. If set this will prevent shields being rendered nearby each other that contain the same text. Similar to shield-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### shield-min-distance `float` - - - - -Default Value: 0 -_(Shields with the same text will be rendered without restriction.)_ - -Minimum distance to the next shield with the same text. Only works for line placement. -* * * - -##### shield-spacing `float` - - - - -Default Value: 0 -_(Only one shield per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated shields on a line. -* * * - -##### shield-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a shield is nearby a tile boundary.)_ - -Minimum distance a shield will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### shield-label-position-tolerance `float` - - - - -Default Value: shield-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by shield-spacing/2.0 to try placement again.)_ - -Allows the shield to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### shield-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### shield-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### shield-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long names. -* * * - -##### shield-halo-fill `color` - - - - -Default Value: white -_(The shield halo text will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### shield-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### shield-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The shield will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### shield-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform shield halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### shield-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### shield-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### shield-character-spacing `unsigned` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement. -* * * - -##### shield-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing between lines of multiline labels (in pixels). -* * * - -##### shield-text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the shield right. -* * * - -##### shield-text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the shield down. -* * * - -##### shield-dx `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right. -* * * - -##### shield-dy `float` - - - - -Default Value: 0 -_(Shield will not be displaced.)_ - -Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down. -* * * - -##### shield-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the image used for the shield. -* * * - -##### shield-text-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the text placed on top of the shield. -* * * - -##### shield-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -The shield's horizontal alignment from its centerpoint. -* * * - -##### shield-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: middle -_(TODO.)_ - -The shield's vertical alignment from its centerpoint. -* * * - -##### shield-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size shield to avoid overlaps. "simple" for basic algorithm (using shield-placements string,) "dummy" to turn this feature off. -* * * - -##### shield-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `shield-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### shield-text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(No text transformation will be applied.)_ - -Transform the case of the characters. -* * * - -##### shield-justify-alignment `keyword` - -`left` `center` `right` `auto` - - -Default Value: auto -_(TODO.)_ - -Define how text in a shield's label is justified. -* * * - -##### shield-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform shield instance with specified function. Ignores map scale factor. -* * * - -##### shield-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### shield-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for shield placement by the given tolerance. -* * * - -##### shield-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for shield placement by the given algorithm. -* * * - -##### shield-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for shield placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### shield-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## line-pattern - -##### line-pattern-file `uri` - - - - -Default Value: none - - -An image file to be repeated and warped along a line. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### line-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### line-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### line-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### line-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### line-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### line-pattern-offset `float` - - - - -Default Value: 0 -_(The line will not be offset.)_ - -Offsets a line a number of pixels parallel to its actual path. Positive values move the line left, negative values move it right (relative to the directionality of the line). -* * * - -##### line-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform line geometry with specified function and apply pattern to transformed geometry. -* * * - -##### line-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform line pattern instance with specified function. -* * * - -##### line-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## polygon-pattern - -##### polygon-pattern-file `uri` - - - - -Default Value: none - - -Image to use as a repeated pattern fill within a polygon. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### polygon-pattern-alignment `keyword` - -`global` `local` - - -Default Value: global -_(Patterns will be aligned to the map (or tile boundaries) when being repeated across polygons. This is ideal for seamless patterns in tiled rendering.)_ - -Specify whether to align pattern fills to the layer's geometry (local) or to the map (global). -* * * - -##### polygon-pattern-gamma `float` - - - - -Default Value: 1 -_(Fully antialiased.)_ -Range: 0-1 -Level of antialiasing of polygon pattern edges. -* * * - -##### polygon-pattern-opacity `float` - - - - -Default Value: 1 -_(The image is rendered without modifications.)_ - -Apply an opacity level to the image used for the pattern. -* * * - -##### polygon-pattern-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### polygon-pattern-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -geometries are simplified by the given tolerance. -* * * - -##### polygon-pattern-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -geometries are simplified by the given algorithm. -* * * - -##### polygon-pattern-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### polygon-pattern-geometry-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(The geometry will not be transformed.)_ - -Transform polygon geometry with specified function and apply pattern to transformed geometry. -* * * - -##### polygon-pattern-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform polygon pattern instance with specified function. -* * * - -##### polygon-pattern-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## raster - -##### raster-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the raster symbolizer on top of other symbolizers. -* * * - -##### raster-filter-factor `float` - - - - -Default Value: -1 -_(Allow the datasource to choose appropriate downscaling.)_ - -This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed. -* * * - -##### raster-scaling `keyword` - -`near` `fast` `bilinear` `bicubic` `spline16` `spline36` `hanning` `hamming` `hermite` `kaiser` `quadric` `catrom` `gaussian` `bessel` `mitchell` `sinc` `lanczos` `blackman` - - -Default Value: near -_(Nearest neighboor resampling will be used to scale the image to the target size of the map.)_ - -The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality. -* * * - -##### raster-mesh-size `unsigned` - - - - -Default Value: 16 -_(Reprojection mesh will be 1/16 of the resolution of the source image.)_ - -A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion. -* * * - -##### raster-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### raster-colorizer-default-mode `keyword` - -`discrete` `linear` `exact` - - -Default Value: linear -_(A linear interpolation is used to generate colors between the two nearest stops.)_ - -This can be either `discrete`, `linear` or `exact`. If it is not specified then the default is `linear`. -* * * - -##### raster-colorizer-default-color `color` - - - - -Default Value: transparent -_(Pixels that are not colored by the colorizer stops will be transparent.)_ - -This can be any color. Sets the color that is applied to all values outside of the range of the colorizer-stops. If not supplied pixels will be fully transparent. -* * * - -##### raster-colorizer-epsilon `float` - - - - -Default Value: 1.1920928955078125e-07 -_(Pixels must very closely match the stop filter otherwise they will not be colored.)_ - -This can be any positive floating point value and will be used as a tolerance in floating point comparisions. The higher the value the more likely a stop will match and color data. -* * * - -##### raster-colorizer-stops `tags` - - - - -Default Value: -_(No colorization will happen without supplying stops.)_ - -Assigns raster data values to colors. Stops must be listed in ascending order, and contain at a minimum the value and the associated color. You can also include the color-mode as a third argument, like `stop(100,#fff,exact)`. -* * * - - -## point - -##### point-file `uri` - - - - -Default Value: none -_(A 4x4 black square will be rendered.)_ - -Image file to represent a point. Accepted formats: svg, jpg, png, tiff, and webp. -* * * - -##### point-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow points to overlap with each other - overlapping markers will not be shown.)_ - -Control whether overlapping points are shown or hidden. -* * * - -##### point-ignore-placement `boolean` - - - - -Default Value: false -_(do not store the bbox of this geometry in the collision detector cache.)_ - -Control whether the placement of the feature will prevent the placement of other features. -* * * - -##### point-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A value from 0 to 1 to control the opacity of the point. -* * * - -##### point-placement `keyword` - -`centroid` `interior` - - -Default Value: centroid -_(The centroid of the geometry will be used to place the point.)_ - -Control how this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon. -* * * - -##### point-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: none -_(No transformation.)_ - -Transform point instance with specified function. Ignores map scale factor. -* * * - -##### point-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - - -## text - -##### text-name `string` - - - - -Default Value: none - - -Value to use for a text label. Data columns are specified using brackets like [column_name]. -* * * - -##### text-face-name `string` - - - - -Default Value: none - - -Font name and style to render a label in. -* * * - -##### text-size `float` - - - - -Default Value: 10 -_(Font size of 10 will be used to render text.)_ - -Text size in pixels. -* * * - -##### text-ratio `unsigned` - - - - -Default Value: 0 -_(TODO.)_ - -Define the amount of text (of the total) present on successive lines when wrapping occurs. -* * * - -##### text-wrap-width `unsigned` - - - - -Default Value: 0 -_(Text will not be wrapped.)_ - -Length of a chunk of text in pixels before wrapping text. If set to zero, text doesn't wrap. -* * * - -##### text-wrap-before `boolean` - - - - -Default Value: false -_(Wrapped lines will be a bit longer than wrap-width.)_ - -Wrap text before wrap-width is reached. -* * * - -##### text-wrap-character `string` - - - - -Default Value: " " -_(Lines will be wrapped when whitespace is encountered.)_ - -Use this character instead of a space to wrap long text. -* * * - -##### text-repeat-wrap-character `boolean` -Status: *unstable* - - - - - -Default Value: false -_(Character will be removed when used to wrap a line.)_ - -Keep the character used to wrap a line instead of removing it, and repeat it on the new line. -* * * - -##### text-spacing `unsigned` - - - - -Default Value: 0 -_(Only one label per line will attempt to be placed.)_ - -Distance the renderer should use to try to place repeated text labels on a line. -* * * - -##### text-character-spacing `float` - - - - -Default Value: 0 -_(The default character spacing of the font will be used.)_ - -Horizontal spacing adjustment between characters in pixels. This value is ignored when `horizontal-alignment` is set to `adjust`. Typographic ligatures are turned off when this value is greater than zero. -* * * - -##### text-line-spacing `float` - - - - -Default Value: 0 -_(The default font spacing will be used.)_ - -Vertical spacing adjustment between lines in pixels. -* * * - -##### text-label-position-tolerance `float` - - - - -Default Value: text-spacing/2.0 -_(If a shield cannot be placed then the renderer will advance by text-spacing/2.0 to try placement again.)_ - -Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line). -* * * - -##### text-max-char-angle-delta `float` - - - - -Default Value: 22.5 -_(The label will not be placed if a character falls on a line with an angle sharper than 22.5 degrees.)_ - -The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners. -* * * - -##### text-fill `color` - - - - -Default Value: black -_(The text will be rendered black.)_ - -Specifies the color for the text. -* * * - -##### text-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text. -* * * - -##### text-halo-opacity `float` - - - - -Default Value: 1 -_(Fully opaque.)_ - -A number from 0 to 1 specifying the opacity for the text halo. -* * * - -##### text-halo-fill `color` - - - - -Default Value: white -_(The halo will be rendered white.)_ - -Specifies the color of the halo around the text. -* * * - -##### text-halo-radius `float` - - - - -Default Value: 0 -_(no halo.)_ - -Specify the radius of the halo in pixels. -* * * - -##### text-halo-rasterizer `keyword` - -`full` `fast` - - -Default Value: full -_(The text will be rendered using the highest quality method rather than the fastest.)_ - -Exposes an alternate text halo rendering method that sacrifices quality for speed. -* * * - -##### text-halo-transform `functions` - - -`matrix` `translate` `scale` `rotate` `skewX` `skewY` - -Default Value: -_(No transformation.)_ - -Transform text halo relative to the actual text with specified function. Allows for shadow or embossed effects. Ignores map scale factor. -* * * - -##### text-dx `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the X axis. With "dummy" placement-type, a positive value displaces to the right. With "simple" placement-type, it is either left, right or unchanged, depending on the placement selected. Any non-zero value implies "horizontal-alignment" changes to "left" by default. Has no effect with 'line' text-placement-type. -* * * - -##### text-dy `float` - - - - -Default Value: 0 -_(Text will not be displaced.)_ - -Displace text by fixed amount, in pixels, +/- along the Y axis. With "dummy" placement-type, a positive value displaces downwards. With "simple" placement-type, it is either up, down or unchanged, depending on the placement selected. With "line" placement-type, a positive value displaces above the path. -* * * - -##### text-vertical-alignment `keyword` - -`top` `middle` `bottom` `auto` - - -Default Value: auto -_(Default affected by value of dy; "top" for dy>0, "bottom" for dy<0.)_ - -Position of label relative to point position. -* * * - -##### text-avoid-edges `boolean` - - - - -Default Value: false -_(Text will be potentially placed near tile edges and therefore may look cut off unless the same text label is rendered on each adjacent tile.)_ - -Avoid placing labels that intersect with tile boundaries. -* * * - -##### text-margin `float` - - - - -Default Value: 0 -_(No extra margin will be used to determine if a label collides with any other text, shield, or marker.)_ - -Minimum distance that a label can be placed from any other text, shield, or marker. -* * * - -##### text-repeat-distance `float` - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance between repeated text. If set this will prevent text labels being rendered nearby each other that contain the same text. Similar to text-min-distance with the difference that it works the same no matter what placement strategy is used. -* * * - -##### text-min-distance `float` -Status: *deprecated* - - - - - -Default Value: 0 -_(Labels with the same text will be rendered without restriction.)_ - -Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by `text-repeat-distance` and `text-margin` -* * * - -##### text-min-padding `float` - - - - -Default Value: 0 -_(No margin will be used to detect if a text label is nearby a tile boundary.)_ - -Minimum distance a text label will be placed from the edge of a tile. This option is similar to shield-avoid-edges:true except that the extra margin is used to discard cases where the shield+margin are not fully inside the tile. -* * * - -##### text-min-path-length `float` - - - - -Default Value: 0 -_(place labels on all geometries no matter how small they are.)_ - -Place labels only on polygons and lines with a bounding width longer than this value (in pixels). -* * * - -##### text-allow-overlap `boolean` - - - - -Default Value: false -_(Do not allow text to overlap with other text - overlapping markers will not be shown.)_ - -Control whether overlapping text is shown or hidden. -* * * - -##### text-orientation `float` - - - - -Default Value: 0 -_(Text is not rotated and is displayed upright.)_ - -Rotate the text. (only works with text-placement:point). -* * * - -##### text-rotate-displacement `boolean` - - - - -Default Value: false -_(Label center is used for rotation.)_ - -Rotates the displacement around the placement origin by the angle given by "orientation". -* * * - -##### text-upright `keyword` - -`auto` `auto-down` `left` `right` `left-only` `right-only` - - -Default Value: auto -_(Text will be positioned upright automatically.)_ - -How this label should be placed along lines. By default when more than half of a label's characters are upside down the label is automatically flipped to keep it upright. By changing this parameter you can prevent this "auto-upright" behavior. The "auto-down" value places text in the opposite orientation to "auto". The "left" or "right" settings can be used to force text to always be placed along a line in a given direction and therefore disables flipping if text appears upside down. The "left-only" or "right-only" properties also force a given direction but will discard upside down text rather than trying to flip it. -* * * - -##### text-placement `keyword` - -`point` `line` `vertex` `interior` - - -Default Value: point -_(One shield will be placed per geometry.)_ - -How this label should be placed. Point placement places one label on top of a point geometry and at the centroid of a polygon or the middle point of a line, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of a polygon. -* * * - -##### text-placement-type `keyword` - -`dummy` `simple` `list` - - -Default Value: dummy -_(Alternative placements will not be enabled.)_ - -Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off. -* * * - -##### text-placements `string` - - - - -Default Value: -_(No alternative placements will be used.)_ - -If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";`. -* * * - -##### text-transform `keyword` - -`none` `uppercase` `lowercase` `capitalize` `reverse` - - -Default Value: none -_(Transform text instance with specified function. Ignores map scale factor.)_ - -Transform the case of the characters. -* * * - -##### text-horizontal-alignment `keyword` - -`left` `middle` `right` `auto` `adjust` - - -Default Value: auto -_(TODO.)_ - -The text's horizontal alignment from it's centerpoint. If `placement` is set to `line`, then `adjust` can be set to auto-fit the text to the length of the path by dynamically calculating `character-spacing`. -* * * - -##### text-align `keyword` - -`left` `right` `center` `auto` - - -Default Value: auto -_(Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives.)_ - -Define how text is justified. -* * * - -##### text-clip `boolean` - - - - -Default Value: false -_(The geometry will not be clipped to map bounds before rendering.)_ - -Turning on clipping can help performance in the case that the boundaries of the geometry extent outside of tile extents. But clipping can result in undesirable rendering artifacts in rare cases. -* * * - -##### text-simplify `float` - - - - -Default Value: 0 -_(geometry will not be simplified.)_ - -Simplify the geometries used for text placement by the given tolerance. -* * * - -##### text-simplify-algorithm `keyword` - -`radial-distance` `zhao-saalfeld` `visvalingam-whyatt` - - -Default Value: radial-distance -_(The geometry will be simplified using the radial distance algorithm.)_ - -Simplify the geometries used for text placement by the given algorithm. -* * * - -##### text-smooth `float` - - - - -Default Value: 0 -_(No smoothing.)_ -Range: 0-1 -Smooths out the angles of the geometry used for text placement. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries. -* * * - -##### text-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-halo-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current symbolizer on top of other symbolizer.)_ - -Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it. -* * * - -##### text-font-feature-settings `string` - - - - -Default Value: -_(Default set of typographic features recommended by OpenType specification. Ligatures are turned off by default when `character-spacing` is greater than zero.)_ - -Comma separated list of OpenType typographic features. The syntax and semantics conforms to `font-feature-settings` from W3C CSS. -* * * - -##### text-largest-bbox-only `boolean` -Status: *experimental* - - - - - -Default Value: true -_(For multipolygons only polygon with largest bbox area is labeled (does not apply to other geometries).)_ - -Controls default labeling behavior on multipolygons. The default is true and means that only the polygon with largest bbox is labeled. -* * * - - -## building - -##### building-fill `color` - - - - -Default Value: The color gray will be used for fill. -_(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)_ - -The color of the buildings fill. Note: 0.8 will be used to multiply each color component to auto-generate a darkened wall color. -* * * - -##### building-fill-opacity `float` - - - - -Default Value: 1 -_(Color is fully opaque.)_ - -The opacity of the building as a whole, including all walls. -* * * - -##### building-height `float` - - - - -Default Value: 0 -_(Buildings will not have a visual height and will instead look like flat polygons.)_ - -The height of the building in pixels. -* * * - - -## debug - -##### debug-mode `string` - - - - -Default Value: collision -_(The otherwise invisible collision boxes will be rendered as squares on the map.)_ - -The mode for debug rendering. -* * * - - -## dot - -##### dot-fill `color` - - - - -Default Value: gray -_(The dot fill color is gray.)_ - -The color of the area of the dot. -* * * - -##### dot-opacity `float` - - - - -Default Value: 1 -_(The opacity of the dot.)_ - -The overall opacity of the dot. -* * * - -##### dot-width `float` - - - - -Default Value: 1 -_(The marker width is 1 pixel.)_ - -The width of the dot in pixels. -* * * - -##### dot-height `float` - - - - -Default Value: 1 -_(The marker height is 1 pixels.)_ - -The height of the dot in pixels. -* * * - -##### dot-comp-op `keyword` - -`clear` `src` `dst` `src-over` `dst-over` `src-in` `dst-in` `src-out` `dst-out` `src-atop` `dst-atop` `xor` `plus` `minus` `multiply` `divide` `screen` `overlay` `darken` `lighten` `color-dodge` `color-burn` `linear-dodge` `linear-burn` `hard-light` `soft-light` `difference` `exclusion` `contrast` `invert` `invert-rgb` `grain-merge` `grain-extract` `hue` `saturation` `color` `value` - - -Default Value: src-over -_(Add the current layer on top of other layers.)_ - -Composite operation. This defines how this layer should behave relative to layers atop or below it. -* * * - - - - -### Values - -Below is a list of values and an explanation of any expression that can be applied to properties in CartoCSS. - -### Color - -CartoCSS accepts a variety of syntaxes for colors - HTML-style hex values, rgb, rgba, hsl, hsla, hsluv, and hsluva (husl and husla are deprecated). It also supports the predefined HTML colors names, like `yellow` and `blue`. - -``` css -#line { -line-color: #ff0; -line-color: #ffff00; -line-color: rgb(255, 255, 0); -line-color: rgba(255, 255, 0, 1); -line-color: hsl(100, 50%, 50%); -line-color: hsla(100, 50%, 50%, 1); -line-color: hsluv(100, 50%, 50%); // same values yield different color than HSL -line-color: hsluva(100, 50%, 50%, 1); -line-color: yellow; -} -``` - -Especially of note is the support for hsl and hsluv, which can be [easier to reason about than rgb()](http://mothereffinghsl.com/). Carto also includes several color operation functions [borrowed from less](http://lesscss.org/functions/#color-operations): - -``` css -// lighten and darken colors -lighten(#ace, 10%); -darken(#ace, 10%); - -// saturate and desaturate -saturate(#550000, 10%); -desaturate(#00ff00, 10%); - -// increase or decrease the opacity of a color -fadein(#fafafa, 10%); -fadeout(#fefefe, 14%); - -// spin rotates a color around the color wheel by degrees -spin(#ff00ff, 10); - -// mix generates a color in between two other colors. -mix(#fff, #000, 50%); - -// get color components -hue(#ff00ff); -saturation(#ff00ff); -lightness(#ff00ff); -alpha(hsla(100, 50%, 50%, 0.5)); -``` - -These functions all take arguments which can be color variables, literal colors, or the results of other functions operating on colors. All the above mentioned functions also come in -a `functionp`-variant (e.g. `lightenp`), which force a given color into perceptual color space. - -### Float - -Float is a fancy way of saying 'number'. In CartoCSS, you specify _just a number_ - unlike CSS, there are no units, but everything is specified in pixels. - -``` css -#line { -line-width: 2; -} -``` - -It's also possible to do simple math with number values: - -``` css -#line { -line-width: 4 / 2; // division -line-width: 4 + 2; // addition -line-width: 4 - 2; // subtraction -line-width: 4 * 2; // multiplication -line-width: 4 % 2; // modulus -} -``` - -### URI - -URI is a fancy way of saying URL. When an argument is a URI, you use the same kind of `url('place.png')` notation that you would with HTML. Quotes around the URL aren't required, but are highly recommended. URIs can be paths to places on your computer, or on the internet. - -```css -#markers { -marker-file: url('marker.png'); -} -``` - -### String - -A string is basically just text. In the case of CartoCSS, you're going to put it in quotes. Strings can be anything, though pay attention to the cases of `text-name` and `shield-name` - they actually will refer to features, which you refer to by putting them in brackets, as seen in the example below. - -```css -#labels { -text-name: "[MY_FIELD]"; -} -``` - -### Boolean - -Boolean means yes or no, so it accepts the values `true` or `false`. - -```css -#markers { -marker-allow-overlap:true; -} -``` - -### Expressions - -Expressions are statements that can include fields, numbers, and other types in a really flexible way. You have run into expressions before, in the realm of 'fields', where you'd specify `"[FIELD]"`, but expressions allow you to drop the quotes and also do quick addition, division, multiplication, and concatenation from within Carto syntax. - -```css -#buildings { -building-height: [HEIGHT_FIELD] * 10; -} -``` - -### Numbers -Numbers are comma-separated lists of one or more number in a specific order. They're used in line dash arrays, in which the numbers specify intervals of line, break, and line again. - -```css -#disputedboundary { -line-dasharray: 1, 4, 2; -} -``` - -### Percentages -In Carto, the percentage symbol, `%` universally means `value/100`. It's meant to be used with ratio-related properties, like opacity rules. - -_You should not use percentages as widths, heights, or other properties - unlike CSS, percentages are not relative to cascaded classes or page size, they're, as stated, simply the value divided by one hundred._ - -```css -#world { -// this syntax -polygon-opacity: 50%; - -// is equivalent to -polygon-opacity: 0.5; -} -``` - -### Functions - -Functions are comma-separated lists of one or more functions. For instance, transforms use the `functions` type to allow for transforms within Carto, which are optionally chainable. - -```css -#point { -point-transform: scale(2, 2); -} -``` - -### Mapnik Render-Time Variables - -Mapnik >= 3.0.0 supports variables of the form `@var`. These can be used from CartoCSS by specifying them as strings. For example: - -``` -#layer { - line-width: '@zoom'; -} -``` - -For this to have any effect you have to pass the variables to Mapnik at render time in a hashmap of the form variable_name:variable_value. - -### Resetting properties - -You can reset properties by specifying them with the keyword `none`. They will then be removed from the symbolizer thus using their default value -or not using them at all. This does not work or makes sense for all properties like e.g. not for `text-face-name`. For an overview over properties -where this works or makes sense see [this list](https://github.com/mapbox/carto/blob/master/test/rendering-mss/issue_214.mss). diff --git a/docs/mapnik_api._ b/docs/mapnik_api._ new file mode 100644 index 000000000..8c79a55bc --- /dev/null +++ b/docs/mapnik_api._ @@ -0,0 +1,9 @@ +Mapnik API documentation +======================== + +The following is a list of properties provided in CartoCSS that you can apply to map elements +when using the Mapnik renderer. Each API version of Mapnik has its own subsection. Pick the one that +applies to the version you are running. If there is no subsection for your specific version the +next older listed version applies to this version. + +<%= versions %> diff --git a/docs/mapnik_api.rst b/docs/mapnik_api.rst new file mode 100644 index 000000000..8187f359e --- /dev/null +++ b/docs/mapnik_api.rst @@ -0,0 +1,18 @@ +Mapnik API documentation +======================== + +The following is a list of properties provided in CartoCSS that you can apply to map elements +when using the Mapnik renderer. Each API version of Mapnik has its own subsection. Pick the one that +applies to the version you are running. If there is no subsection for your specific version the +next older listed version applies to this version. + +.. include:: api/mapnik/3.0.6.rst +.. include:: api/mapnik/3.0.3.rst +.. include:: api/mapnik/3.0.0.rst +.. include:: api/mapnik/2.3.0.rst +.. include:: api/mapnik/2.2.0.rst +.. include:: api/mapnik/2.1.1.rst +.. include:: api/mapnik/2.1.0.rst +.. include:: api/mapnik/2.0.2.rst +.. include:: api/mapnik/2.0.1.rst +.. include:: api/mapnik/2.0.0.rst diff --git a/docs/mml.rst b/docs/mml.rst new file mode 100644 index 000000000..56511b348 --- /dev/null +++ b/docs/mml.rst @@ -0,0 +1,386 @@ +MML File Structure +================== + +The MML File (we call it like that here because of its file extension .mml) is a +`YAML `_ or `JSON `_ +file containing layer definitions and stylesheet references. Thus, it is the central +part of a CartoCSS stylesheet. If you generate Mapnik XML from a stylesheet this is +the file you feed to carto and from which and its references the XML is produced. + +If you wonder whether you should use YAML or JSON here is a bit of advice. Internally, +JSON is used because it is a language that is easy to understand for machines. +YAML is a superset of JSON and is easier to read and write for humans and is also +less verbose. If you edit a stylesheet collaboratively and use version control +YAML might make it easier to resolve version conflicts. But carto understands both +forms. + +.. note:: YAML makes it less tedious to specify repeating properties like database + infos for PostGIS datasources or extents by using a language feature called + `anchors or aliases `_. + +Properties Overview +------------------- + +What follows is an overview over properties a MML file can have. Simple ones are described +here while more complex ones get their own section. + +center +^^^^^^ +Type: ``Array`` + +Specifies the center coordinates and zoom level of the map. Longitude, latitude and +zoom level in that order. Example (WGS84): ``[-1.28398, 47.08997, 17]`` + +bounds +^^^^^^ +Type: ``Array`` + +Defines a bounding box of the map extent. Lower left coordinates (longitude, latitude) +and upper right coordinates (longitude, latitude) in that order. +Example (WGS84): ``[-179, -80, 179, 80]`` + +description +^^^^^^^^^^^ +Type: ``String`` + +A description for the stylesheet (usually a bit longer than the name) + +format +^^^^^^ +Type: ``Keyword`` + +Possible values: ``png, jpeg, tiff, webp`` + +Specifies the output format Mapnik should use. For more details see the `Mapnik wiki +page on Image IO `_. + +Layer +^^^^^ +Lists all layers in the project (see :ref:`layer-reference`) + +maxzoom +^^^^^^^ +Type: ``Integer`` + +Specifies the maximum zoom level for the map + +metatile +^^^^^^^^ +Type: ``Integer`` + +Specifies the number of tiles that make up one side of a metatile. For example, +if the number is 2 then the metatile is 2 tiles wide and tall and consists of +4 individual tiles. For efficiency reasons Mapnik generates metatiles before +splitting them into individual tiles. + +minzoom +^^^^^^^ +Type: ``Integer`` + +Specifies the minimum zoom level for the map + +name +^^^^ +Type: ``String`` + +A name for the stylesheet + +_properties +^^^^^^^^^^^ +Type: ``Object`` + +This is the same as the ``properties`` property for layers on a global level with +a bit different structure. It is used when you do not specify the layers in the MML +itself but only reference them. This is used in vector tile styles where the style +and the data are separate. + +Specify first the layer name and then below it specify its properties as you would +in the ``properties`` property of the specific layer. + +scale +^^^^^ +Type: ``Integer`` + +Specifies pixel scaling for the output. For example, a scale of 2 means that there +are two pixels for each pixel in the output. + +srs +^^^ +Type: ``String`` + +Specifies the projection used by Mapnik using the `PROJ.4 `_ +format (SRS means `Spatial reference system `_). +The format can be determined by e.g. using `spatialreference.org `_. + +Stylesheet +^^^^^^^^^^ +Lists all styles or style files in the project (see :ref:`stylesheet-reference`) + +.. _layer-reference: + +Layer property +--------------- +Type: ``Array`` + +Within this property layer objects are referenced that are the building blocks +of the map style. The order of specification is important as it constitutes +the drawing order of layers used by Mapnik. Layers specified first are drawn first +and those specified later are drawn afterwards. + +Layers have different properties and their data can come from different data sources +such as shape files or relational databases like PostgreSQL/PostGIS. + +A layer object can have the following properties. + +class +^^^^^ +Type: ``String`` + +One or more classes associated with this layer separated by blanks. In style selectors +a class can be referenced by ``.classname`` if class contains ``classname``. + +Datasource +^^^^^^^^^^ +Mapnik supports different datasources. Within this property you specify the type +of the datasource and additional properties depending on the type. + +Not all possible configuration options for each datasource are listed here. For +further information see the page for the datasource type on the Mapnik Wiki: +e.g. `PostGIS `_, +`PgRaster `_, +`ShapeFile `_, +`GDAL `_, +`OGR `_, +`OsmPlugin `_. + +type +"""" +Type: ``Keyword`` + +Possible values: ``shape, postgis, pgraster, raster, (gdal), (ogr), (osm)`` + +Specifies the format of the data source. Types in parenthesis are *not build +by default* according to the `Mapnik Wiki `_. + +band (gdal, pgraster) +""""""""""""""""""""" +Type: ``Integer`` + +With this property you can request a specific raster band index (1-based). By +specifying `-1` (gdal) / `0` (pgraster) you request to read all bands. + +dbname (postgis, pgraster) +"""""""""""""""""""""""""" +Type: ``String`` + +Specifies the database name of the PostgreSQL database. + +encoding (ogr, postgis, shape) +"""""""""""""""""""""""""""""" +Type: ``String`` + +Specifies the encoding of the database or shapefile e.g. `utf-8` or `latin1`. + +extent (ogr, postgis, pgraster) +""""""""""""""""""""""""""""""" +Type: ``String`` + +Specifies the maximum extent of the geometries or raster data. +Lower left coordinates (longitude, latitude) and upper right coordinates +(longitude, latitude) in that order. By default this is deduced from the +metadata of the table. + +file (gdal, ogr, osm, raster, shape) +"""""""""""""""""""""""""""""""""""" +Type: ``String`` + +Path and file name. + +geometry_field (postgis) +"""""""""""""""""""""""" +Type: ``String`` + +Specifies the name of the column that contains the geometry. Normally this will +be deduced from the query but sometimes it can be necessary to specify it manually +e.g. when there is more than one column with geometry. + +host (postgis, pgraster) +"""""""""""""""""""""""" +Type: ``String`` + +Specifies the hostname of the PostgreSQL database. + +layer (ogr) +""""""""""" +Type: ``String`` + +The name of the layer to display. + +layer_by_index (ogr) +"""""""""""""""""""" +Type: ``Integer`` + +The index of the layer to display (mandatory if no layer name specified). + +layer_by_sql (ogr) +"""""""""""""""""" +Type: ``String`` + +SQL-Statement to execute against the OGR datasource. + +password (postgis, pgraster) +"""""""""""""""""""""""""""" +Type: ``String`` + +Specifies the password for connecting to the PostgreSQL database. + +port (postgis, pgraster) +"""""""""""""""""""""""" +Type: ``String`` + +Specifies the port of the PostgreSQL database. + +raster_field (pgraster) +""""""""""""""""""""""" +Type: ``String`` + +Specifies the name of the column that contains the raster data. Normally this will +be deduced from the query but sometimes it can be necessary to specify it manually +e.g. when there is more than one column with raster data. + +simplify_geometries (postgis) +""""""""""""""""""""""""""""" +Type: ``Boolean`` + +Specify if input vertices should be automatically reduced or not. + +table (postgis, pgraster) +""""""""""""""""""""""""" +Type: ``String`` + +Either the name of the table to fetch or a sub query `(...) AS queryname`. + +user (postgis, pgraster) +"""""""""""""""""""""""" +Type: ``String`` + +Specifies the username for connecting to the PostgreSQL database. + +extent +^^^^^^ +Type: ``Array`` + +Defines a bounding box of the layer extent. Lower left coordinates (longitude, latitude) +and upper right coordinates (longitude, latitude) in that order. +Example (WGS84): ``[-179, -80, 179, 80]`` + +geometry +^^^^^^^^ +Type: ``Keyword`` + +Possible values: ``linestring, point, polygon, raster`` + +Specifies the geometry type for (the datasource of) this layer. + +id +^^ +Type: ``String`` + +A unique identifier for this layer. In style selectors it can be referenced with +``#layerid`` if the id is ``layerid``. + +properties +^^^^^^^^^^ +Type: ``Object`` + +This property basically adds any sub-property as attribute to the Mapnik layer. So +available values depend greatly on what Mapnik allows. Here is an (incomplete) list: + +abstract +"""""""" +Type: ``String`` + +A short description of this layer (typically longer than the title). + +group-by +"""""""" +Type: ``String`` + +Enables `grouped rendering `_ +for Mapnik by specifying the field of the datasource that should be used for grouping. +Mapnik then renders all styles of the layer for those features that have the same +value for that field before moving on to other features that have different value. + +maxzoom +""""""" +Type: ``Integer`` + +Specifies the zoom level until which the layer is visible. + +minzoom +""""""" +Type: ``Integer`` + +Specifies the zoom level from which the layer is visible. + +status +"""""" +Type: ``Integer`` + +Specifies if the layer is active or not. 0 means inactive or off, 1 means +active or on. + +title +""""" +Type: ``String`` + +The title of this layer. Probably more verbose than the ID. + +srs +^^^ +Type: ``String`` + +Specifies the projection for this layer using the `PROJ.4 `_ +format (SRS means `Spatial reference system `_). +The format can be determined by e.g. using `spatialreference.org `_. + +srs-name +^^^^^^^^ +Type: ``String`` + +The name of this SRS. + +.. _stylesheet-reference: + +Stylesheet property +-------------------- + +Type: ``Array`` + +You have two options to specify the styles. Either you reference MSS files or +you specify style objects directly. + +Referencing style files +^^^^^^^^^^^^^^^^^^^^^^^ +Here you reference the style files used in an array of paths/file names. Carto +understands relative as well as absolute paths. The order of style references is +not important. + +Specifying style objects +^^^^^^^^^^^^^^^^^^^^^^^^ +Internally style file references are transformed into style objects anyway, so you +can also specify them directly. This only makes sense if you generate them +programmatically otherwise the notation could become a bit tedious. You specify +an array of style objects. The order of the objects is not important. + +A style object consists of the following properties. + +id +""" +This is the identifier of the style object. When styles are being read from a +style file this is usually the file name. The property is used when generating +errors or warnings so it is advisable to set something recognizable here. + +data +"""" +This contains the actual style in the form of a string. diff --git a/docs/styling_concepts.rst b/docs/styling_concepts.rst new file mode 100644 index 000000000..8aa5a9195 --- /dev/null +++ b/docs/styling_concepts.rst @@ -0,0 +1,136 @@ +Styling Concepts +================ + +Attachments and Instances +------------------------- + +In CSS, a certain object can only have one instance of a property. A ``
`` has a specific border width and color, +rules that match better than others (#id instead of .class) override previous definitions. +CartoCSS acts the same way normally for the sake of familiarity and organization, but Mapnik itself is more powerful. + +Layers in Mapnik can have multiple `borders `_ and multiple copies +of other attributes. This ability is useful in drawing line outlines, like in the case of road borders or 'glow' effects around coasts. +CartoCSS makes this accessible by allowing attachments to styles:: + + #world { + line-color: #fff; + line-width: 3; + } + + #world::outline { + line-color: #000; + line-width: 6; + } + +Attachments are optional. + +While attachments allow creating implicit "layers" with the same data, using **instances** +allows you to create multiple symbolizers in the same style/layer:: + + #roads { + casing/line-width: 6; + casing/line-color: #333; + line-width: 4; + line-color: #666; + } + +This makes Mapnik first draw the line of color #333 with a width of 6, and then immediately afterwards, +it draws the same line again with width 4 and color #666. Contrast that to attachments: +Mapnik would first draw all casings before proceeding to the actual lines. + +Variables & Expressions +----------------------- + +CartoCSS inherits from its basis in `LessCSS `_ some new features in CSS. +One can define variables in stylesheets, and use expressions to modify them. :: + + @mybackground: #2B4D2D; + + Map { + background-color: @mybackground + } + + #world { + polygon-fill: @mybackground + #222; + line-color: darken(@mybackground, 10%); + } + +Nested Styles +------------- + +CartoCSS also inherits nesting of rules from LessCSS. :: + + /* Applies to all layers with .land class */ + .land { + line-color: #ccc; + line-width: 0.5; + polygon-fill: #eee; + /* Applies to #lakes.land */ + #lakes { + polygon-fill: #000; + } + } + +This can be a convenient way to group style changes by zoom level:: + + [zoom > 1] { + /* Applies to all layers at zoom > 1 */ + polygon-gamma: 0.3; + #world { + polygon-fill: #323; + } + #lakes { + polygon-fill: #144; + } + } + +FontSets +-------- + +By defining multiple fonts in a ``text-face-name`` definition, you create `FontSets `_ +in CartoCSS. These are useful for supporting multiple character sets and fallback fonts for distributed styles. + +This CartoCSS code :: + + #world { + text-name: "[NAME]"; + text-size: 11; + text-face-name: "Georgia Regular", "Arial Italic"; + } + +becomes this XML code :: + + + + + + + +Filters +------- + +CartoCSS supports a variety of filter styles: + +Numeric comparisons:: + + #world[population > 100] + #world[population < 100] + #world[population >= 100] + #world[population <= 100] + +General comparisons:: + + #world[population = 100] + #world[population != 100] + + +String comparisons:: + + /* a regular expression over name */ + #world[name =~ "A.*"] diff --git a/docs/symbolizers._ b/docs/symbolizers._ new file mode 100644 index 000000000..656e528bc --- /dev/null +++ b/docs/symbolizers._ @@ -0,0 +1,29 @@ +<% _(symbolizers).each(function(symbolizer, name) { %> +<% if (name == '*') { %> +All elements +^^^^^^^^^^^^ +<% } else { %> +<%= name %> +<%= Array(name.length + 1).join('^') %> +<% } %> +<% _(symbolizer).filter(function(p) { return p.css; }).each(function(p) { %> +<%= p.css.replace(/\s/g, '') %> +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +Type: <% if (_.isArray(p.type)) { %>``keyword``<% } else { %>``<%= p.type %>`` <% } %> + +<% if (_.has(p, 'status')) { %>**Status: <%= p.status %>** + +<% } %> +<% if (_.isArray(p.type)) { %>Possible values: <% _(p.type).each(function(type) { %>``<%= type %>`` <% }); %><% } %> +<% if (p.type === 'functions' && _.isArray(p.functions)) { %>Possible values: <% _(p.functions).each(function(type) { %>``<%= type[0] %>`` <% }); %><% } %> + +<% if (typeof p['default-value'] !== '') { %>Default Value: <%= p['default-value'] %><% } %> +<% if (p['default-meaning']) { %>*(<%= subst(p['default-meaning']) %>)*<% } %> +<% if (typeof p['range'] !== 'undefined') { %>Range: <%= '' + p['range'] %><% } %> +<% if (p.doc) { %><%= subst(p.doc) %><% } %> + +------------ + +<% }); %> +<% }); %>