carto
Version:
Mapnik Stylesheet Compiler
623 lines (552 loc) • 165 kB
HTML
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3.0.0 — carto documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="../../genindex.html"/>
<link rel="search" title="Search" href="../../search.html"/>
<link rel="top" title="carto documentation" href="../../index.html"/>
<script src="../../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../../index.html" class="icon icon-home"> carto
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../installation_usage.html">Installation & Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../language_elements.html">Language Elements</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../styling_concepts.html">Styling Concepts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mapnik_api.html">Mapnik API documentation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">carto</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html">Docs</a> »</li>
<li>3.0.0</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/api/mapnik/3.0.0.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="id1">
<h1>3.0.0<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
<div class="section" id="all-elements">
<h2>All elements<a class="headerlink" href="#all-elements" title="Permalink to this headline">¶</a></h2>
<div class="section" id="image-filters">
<h3>image-filters<a class="headerlink" href="#image-filters" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">functions</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">agg-stack-blur</span></code> <code class="docutils literal"><span class="pre">emboss</span></code> <code class="docutils literal"><span class="pre">blur</span></code> <code class="docutils literal"><span class="pre">gray</span></code> <code class="docutils literal"><span class="pre">sobel</span></code> <code class="docutils literal"><span class="pre">edge-detect</span></code> <code class="docutils literal"><span class="pre">x-gradient</span></code> <code class="docutils literal"><span class="pre">y-gradient</span></code> <code class="docutils literal"><span class="pre">invert</span></code> <code class="docutils literal"><span class="pre">sharpen</span></code> <code class="docutils literal"><span class="pre">colorize-alpha</span></code> <code class="docutils literal"><span class="pre">color-to-alpha</span></code> <code class="docutils literal"><span class="pre">scale-hsla</span></code></p>
<p>Default Value: none
<em>(no filters.)</em></p>
<p>A list of image filters that will be applied to the active rendering canvas for a given style. The presence of one more <code class="docutils literal"><span class="pre">image-filters</span></code> 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 <code class="docutils literal"><span class="pre">image-filters</span></code> have been applied. See <code class="docutils literal"><span class="pre">direct-image-filters</span></code> if you want to apply a filter directly to the main canvas.</p>
</div>
<hr class="docutils" />
<div class="section" id="image-filters-inflate">
<h3>image-filters-inflate<a class="headerlink" href="#image-filters-inflate" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">boolean</span></code></p>
<p>Default Value: false
<em>(No special handling will be done and image filters that blur data will only blur up to the edge of a tile boundary.)</em></p>
<p>A property that can be set to true to enable using an inflated image internally for seamless blurring across tiles (requires buffered data).</p>
</div>
<hr class="docutils" />
<div class="section" id="direct-image-filters">
<h3>direct-image-filters<a class="headerlink" href="#direct-image-filters" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">functions</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">agg-stack-blur</span></code> <code class="docutils literal"><span class="pre">emboss</span></code> <code class="docutils literal"><span class="pre">blur</span></code> <code class="docutils literal"><span class="pre">gray</span></code> <code class="docutils literal"><span class="pre">sobel</span></code> <code class="docutils literal"><span class="pre">edge-detect</span></code> <code class="docutils literal"><span class="pre">x-gradient</span></code> <code class="docutils literal"><span class="pre">y-gradient</span></code> <code class="docutils literal"><span class="pre">invert</span></code> <code class="docutils literal"><span class="pre">sharpen</span></code> <code class="docutils literal"><span class="pre">colorize-alpha</span></code> <code class="docutils literal"><span class="pre">color-to-alpha</span></code> <code class="docutils literal"><span class="pre">scale-hsla</span></code></p>
<p>Default Value: none
<em>(no filters.)</em></p>
<p>A list of image filters to apply to the main canvas (see the <code class="docutils literal"><span class="pre">image-filters</span></code> doc for how they work on a separate canvas).</p>
</div>
<hr class="docutils" />
<div class="section" id="comp-op">
<h3>comp-op<a class="headerlink" href="#comp-op" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">clear</span></code> <code class="docutils literal"><span class="pre">src</span></code> <code class="docutils literal"><span class="pre">dst</span></code> <code class="docutils literal"><span class="pre">src-over</span></code> <code class="docutils literal"><span class="pre">dst-over</span></code> <code class="docutils literal"><span class="pre">src-in</span></code> <code class="docutils literal"><span class="pre">dst-in</span></code> <code class="docutils literal"><span class="pre">src-out</span></code> <code class="docutils literal"><span class="pre">dst-out</span></code> <code class="docutils literal"><span class="pre">src-atop</span></code> <code class="docutils literal"><span class="pre">dst-atop</span></code> <code class="docutils literal"><span class="pre">xor</span></code> <code class="docutils literal"><span class="pre">plus</span></code> <code class="docutils literal"><span class="pre">minus</span></code> <code class="docutils literal"><span class="pre">multiply</span></code> <code class="docutils literal"><span class="pre">divide</span></code> <code class="docutils literal"><span class="pre">screen</span></code> <code class="docutils literal"><span class="pre">overlay</span></code> <code class="docutils literal"><span class="pre">darken</span></code> <code class="docutils literal"><span class="pre">lighten</span></code> <code class="docutils literal"><span class="pre">color-dodge</span></code> <code class="docutils literal"><span class="pre">color-burn</span></code> <code class="docutils literal"><span class="pre">linear-dodge</span></code> <code class="docutils literal"><span class="pre">linear-burn</span></code> <code class="docutils literal"><span class="pre">hard-light</span></code> <code class="docutils literal"><span class="pre">soft-light</span></code> <code class="docutils literal"><span class="pre">difference</span></code> <code class="docutils literal"><span class="pre">exclusion</span></code> <code class="docutils literal"><span class="pre">contrast</span></code> <code class="docutils literal"><span class="pre">invert</span></code> <code class="docutils literal"><span class="pre">invert-rgb</span></code> <code class="docutils literal"><span class="pre">grain-merge</span></code> <code class="docutils literal"><span class="pre">grain-extract</span></code> <code class="docutils literal"><span class="pre">hue</span></code> <code class="docutils literal"><span class="pre">saturation</span></code> <code class="docutils literal"><span class="pre">color</span></code> <code class="docutils literal"><span class="pre">value</span></code></p>
<p>Default Value: src-over
<em>(Add the current layer on top of other layers.)</em></p>
<p>Composite operation. This defines how this layer should behave relative to layers atop or below it.</p>
</div>
<hr class="docutils" />
<div class="section" id="opacity">
<h3>opacity<a class="headerlink" href="#opacity" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(No separate buffer will be used and no alpha will be applied to the style after rendering.)</em></p>
<p>An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer).</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="map">
<h2>map<a class="headerlink" href="#map" title="Permalink to this headline">¶</a></h2>
<div class="section" id="background-color">
<h3>background-color<a class="headerlink" href="#background-color" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">color</span></code></p>
<p>Default Value: none
<em>(Will be rendered transparent.)</em></p>
<p>Map Background color.</p>
</div>
<hr class="docutils" />
<div class="section" id="background-image">
<h3>background-image<a class="headerlink" href="#background-image" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">uri</span></code></p>
<p>Default Value:
<em>(No background image will be used.)</em></p>
<p>An image that is repeated below all features on a map as a background. Accepted formats: svg, jpg, png, tiff, and webp.</p>
</div>
<hr class="docutils" />
<div class="section" id="background-image-comp-op">
<h3>background-image-comp-op<a class="headerlink" href="#background-image-comp-op" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">clear</span></code> <code class="docutils literal"><span class="pre">src</span></code> <code class="docutils literal"><span class="pre">dst</span></code> <code class="docutils literal"><span class="pre">src-over</span></code> <code class="docutils literal"><span class="pre">dst-over</span></code> <code class="docutils literal"><span class="pre">src-in</span></code> <code class="docutils literal"><span class="pre">dst-in</span></code> <code class="docutils literal"><span class="pre">src-out</span></code> <code class="docutils literal"><span class="pre">dst-out</span></code> <code class="docutils literal"><span class="pre">src-atop</span></code> <code class="docutils literal"><span class="pre">dst-atop</span></code> <code class="docutils literal"><span class="pre">xor</span></code> <code class="docutils literal"><span class="pre">plus</span></code> <code class="docutils literal"><span class="pre">minus</span></code> <code class="docutils literal"><span class="pre">multiply</span></code> <code class="docutils literal"><span class="pre">divide</span></code> <code class="docutils literal"><span class="pre">screen</span></code> <code class="docutils literal"><span class="pre">overlay</span></code> <code class="docutils literal"><span class="pre">darken</span></code> <code class="docutils literal"><span class="pre">lighten</span></code> <code class="docutils literal"><span class="pre">color-dodge</span></code> <code class="docutils literal"><span class="pre">color-burn</span></code> <code class="docutils literal"><span class="pre">linear-dodge</span></code> <code class="docutils literal"><span class="pre">linear-burn</span></code> <code class="docutils literal"><span class="pre">hard-light</span></code> <code class="docutils literal"><span class="pre">soft-light</span></code> <code class="docutils literal"><span class="pre">difference</span></code> <code class="docutils literal"><span class="pre">exclusion</span></code> <code class="docutils literal"><span class="pre">contrast</span></code> <code class="docutils literal"><span class="pre">invert</span></code> <code class="docutils literal"><span class="pre">invert-rgb</span></code> <code class="docutils literal"><span class="pre">grain-merge</span></code> <code class="docutils literal"><span class="pre">grain-extract</span></code> <code class="docutils literal"><span class="pre">hue</span></code> <code class="docutils literal"><span class="pre">saturation</span></code> <code class="docutils literal"><span class="pre">color</span></code> <code class="docutils literal"><span class="pre">value</span></code></p>
<p>Default Value: src-over
<em>(The background-image will be blended with the background normally (placed on top of any existing background-color).)</em></p>
<p>Set the compositing operation used to blend the image into the background.</p>
</div>
<hr class="docutils" />
<div class="section" id="background-image-opacity">
<h3>background-image-opacity<a class="headerlink" href="#background-image-opacity" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(The image opacity will not be changed when applied to the map background.)</em></p>
<p>Set the opacity of the image.</p>
</div>
<hr class="docutils" />
<div class="section" id="srs">
<h3>srs<a class="headerlink" href="#srs" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">string</span></code></p>
<p>Default Value: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
<em>(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.)</em></p>
<p>Map spatial reference (proj4 string).</p>
</div>
<hr class="docutils" />
<div class="section" id="buffer-size">
<h3>buffer-size<a class="headerlink" href="#buffer-size" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 0
<em>(No buffer will be used.)</em></p>
<p>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”.</p>
</div>
<hr class="docutils" />
<div class="section" id="maximum-extent">
<h3>maximum-extent<a class="headerlink" href="#maximum-extent" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">string</span></code></p>
<p>Default Value: -20037508.34,-20037508.34,20037508.34,20037508.34
<em>(All data will be clipped to global mercator extent (default is applied in Carto.js).)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="base">
<h3>base<a class="headerlink" href="#base" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">string</span></code></p>
<p>Default Value:
<em>(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.)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="font-directory">
<h3>font-directory<a class="headerlink" href="#font-directory" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">uri</span></code></p>
<p>Default Value: none
<em>(No map-specific fonts will be registered.)</em></p>
<p>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).</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="polygon">
<h2>polygon<a class="headerlink" href="#polygon" title="Permalink to this headline">¶</a></h2>
<div class="section" id="polygon-fill">
<h3>polygon-fill<a class="headerlink" href="#polygon-fill" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">color</span></code></p>
<p>Default Value: The color gray will be used for fill.
<em>(Gray and fully opaque (alpha = 1), same as rgb(128,128,128) or rgba(128,128,128,1).)</em></p>
<p>Fill color to assign to a polygon.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-opacity">
<h3>polygon-opacity<a class="headerlink" href="#polygon-opacity" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(Color is fully opaque.)</em></p>
<p>The opacity of the polygon.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-gamma">
<h3>polygon-gamma<a class="headerlink" href="#polygon-gamma" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(Fully antialiased.)</em>
Range: 0-1
Level of antialiasing of polygon edges.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-gamma-method">
<h3>polygon-gamma-method<a class="headerlink" href="#polygon-gamma-method" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">power</span></code> <code class="docutils literal"><span class="pre">linear</span></code> <code class="docutils literal"><span class="pre">none</span></code> <code class="docutils literal"><span class="pre">threshold</span></code> <code class="docutils literal"><span class="pre">multiply</span></code></p>
<p>Default Value: power
<em>(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.)</em></p>
<p>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 <a class="reference external" href="https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions">https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions</a>.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-clip">
<h3>polygon-clip<a class="headerlink" href="#polygon-clip" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">boolean</span></code></p>
<p>Default Value: false
<em>(The geometry will not be clipped to map bounds before rendering.)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-simplify">
<h3>polygon-simplify<a class="headerlink" href="#polygon-simplify" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 0
<em>(geometry will not be simplified.)</em></p>
<p>Simplify geometries by the given tolerance.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-simplify-algorithm">
<h3>polygon-simplify-algorithm<a class="headerlink" href="#polygon-simplify-algorithm" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">radial-distance</span></code> <code class="docutils literal"><span class="pre">zhao-saalfeld</span></code> <code class="docutils literal"><span class="pre">visvalingam-whyatt</span></code></p>
<p>Default Value: radial-distance
<em>(The geometry will be simplified using the radial distance algorithm.)</em></p>
<p>Simplify geometries by the given algorithm.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-smooth">
<h3>polygon-smooth<a class="headerlink" href="#polygon-smooth" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 0
<em>(No smoothing.)</em>
Range: 0-1
Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-geometry-transform">
<h3>polygon-geometry-transform<a class="headerlink" href="#polygon-geometry-transform" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">functions</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">matrix</span></code> <code class="docutils literal"><span class="pre">translate</span></code> <code class="docutils literal"><span class="pre">scale</span></code> <code class="docutils literal"><span class="pre">rotate</span></code> <code class="docutils literal"><span class="pre">skewX</span></code> <code class="docutils literal"><span class="pre">skewY</span></code></p>
<p>Default Value: none
<em>(The geometry will not be transformed.)</em></p>
<p>Transform polygon geometry with specified function.</p>
</div>
<hr class="docutils" />
<div class="section" id="polygon-comp-op">
<h3>polygon-comp-op<a class="headerlink" href="#polygon-comp-op" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">clear</span></code> <code class="docutils literal"><span class="pre">src</span></code> <code class="docutils literal"><span class="pre">dst</span></code> <code class="docutils literal"><span class="pre">src-over</span></code> <code class="docutils literal"><span class="pre">dst-over</span></code> <code class="docutils literal"><span class="pre">src-in</span></code> <code class="docutils literal"><span class="pre">dst-in</span></code> <code class="docutils literal"><span class="pre">src-out</span></code> <code class="docutils literal"><span class="pre">dst-out</span></code> <code class="docutils literal"><span class="pre">src-atop</span></code> <code class="docutils literal"><span class="pre">dst-atop</span></code> <code class="docutils literal"><span class="pre">xor</span></code> <code class="docutils literal"><span class="pre">plus</span></code> <code class="docutils literal"><span class="pre">minus</span></code> <code class="docutils literal"><span class="pre">multiply</span></code> <code class="docutils literal"><span class="pre">divide</span></code> <code class="docutils literal"><span class="pre">screen</span></code> <code class="docutils literal"><span class="pre">overlay</span></code> <code class="docutils literal"><span class="pre">darken</span></code> <code class="docutils literal"><span class="pre">lighten</span></code> <code class="docutils literal"><span class="pre">color-dodge</span></code> <code class="docutils literal"><span class="pre">color-burn</span></code> <code class="docutils literal"><span class="pre">linear-dodge</span></code> <code class="docutils literal"><span class="pre">linear-burn</span></code> <code class="docutils literal"><span class="pre">hard-light</span></code> <code class="docutils literal"><span class="pre">soft-light</span></code> <code class="docutils literal"><span class="pre">difference</span></code> <code class="docutils literal"><span class="pre">exclusion</span></code> <code class="docutils literal"><span class="pre">contrast</span></code> <code class="docutils literal"><span class="pre">invert</span></code> <code class="docutils literal"><span class="pre">invert-rgb</span></code> <code class="docutils literal"><span class="pre">grain-merge</span></code> <code class="docutils literal"><span class="pre">grain-extract</span></code> <code class="docutils literal"><span class="pre">hue</span></code> <code class="docutils literal"><span class="pre">saturation</span></code> <code class="docutils literal"><span class="pre">color</span></code> <code class="docutils literal"><span class="pre">value</span></code></p>
<p>Default Value: src-over
<em>(Add the current symbolizer on top of other symbolizer.)</em></p>
<p>Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="line">
<h2>line<a class="headerlink" href="#line" title="Permalink to this headline">¶</a></h2>
<div class="section" id="line-color">
<h3>line-color<a class="headerlink" href="#line-color" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">color</span></code></p>
<p>Default Value: black
<em>(black and fully opaque (alpha = 1), same as rgb(0,0,0) or rgba(0,0,0,1).)</em></p>
<p>The color of a drawn line.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-width">
<h3>line-width<a class="headerlink" href="#line-width" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(The line will be rendered 1 pixel wide.)</em></p>
<p>The width of a line in pixels.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-opacity">
<h3>line-opacity<a class="headerlink" href="#line-opacity" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(Color is fully opaque.)</em></p>
<p>The opacity of a line.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-join">
<h3>line-join<a class="headerlink" href="#line-join" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">miter</span></code> <code class="docutils literal"><span class="pre">miter-revert</span></code> <code class="docutils literal"><span class="pre">round</span></code> <code class="docutils literal"><span class="pre">bevel</span></code></p>
<p>Default Value: miter
<em>(The line joins will be rendered using a miter look.)</em></p>
<p>The behavior of lines when joining.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-cap">
<h3>line-cap<a class="headerlink" href="#line-cap" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">butt</span></code> <code class="docutils literal"><span class="pre">round</span></code> <code class="docutils literal"><span class="pre">square</span></code></p>
<p>Default Value: butt
<em>(The line endings will be rendered using a butt look.)</em></p>
<p>The display of line endings.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-gamma">
<h3>line-gamma<a class="headerlink" href="#line-gamma" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(Fully antialiased.)</em>
Range: 0-1
Level of antialiasing of stroke line.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-gamma-method">
<h3>line-gamma-method<a class="headerlink" href="#line-gamma-method" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">power</span></code> <code class="docutils literal"><span class="pre">linear</span></code> <code class="docutils literal"><span class="pre">none</span></code> <code class="docutils literal"><span class="pre">threshold</span></code> <code class="docutils literal"><span class="pre">multiply</span></code></p>
<p>Default Value: power
<em>(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.)</em></p>
<p>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 <a class="reference external" href="https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions">https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions</a>.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-dasharray">
<h3>line-dasharray<a class="headerlink" href="#line-dasharray" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">numbers</span></code></p>
<p>Default Value: none
<em>(The line will be drawn without dashes.)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-dash-offset">
<h3>line-dash-offset<a class="headerlink" href="#line-dash-offset" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">numbers</span></code></p>
<p>Default Value: none
<em>(The line will be drawn without dashes.)</em></p>
<p>Valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled).</p>
</div>
<hr class="docutils" />
<div class="section" id="line-miterlimit">
<h3>line-miterlimit<a class="headerlink" href="#line-miterlimit" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 4
<em>(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 )’.)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-clip">
<h3>line-clip<a class="headerlink" href="#line-clip" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">boolean</span></code></p>
<p>Default Value: false
<em>(The geometry will not be clipped to map bounds before rendering.)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-simplify">
<h3>line-simplify<a class="headerlink" href="#line-simplify" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 0
<em>(geometry will not be simplified.)</em></p>
<p>Simplify geometries by the given tolerance.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-simplify-algorithm">
<h3>line-simplify-algorithm<a class="headerlink" href="#line-simplify-algorithm" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">radial-distance</span></code> <code class="docutils literal"><span class="pre">zhao-saalfeld</span></code> <code class="docutils literal"><span class="pre">visvalingam-whyatt</span></code></p>
<p>Default Value: radial-distance
<em>(The geometry will be simplified using the radial distance algorithm.)</em></p>
<p>Simplify geometries by the given algorithm.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-smooth">
<h3>line-smooth<a class="headerlink" href="#line-smooth" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 0
<em>(No smoothing.)</em>
Range: 0-1
Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-offset">
<h3>line-offset<a class="headerlink" href="#line-offset" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p><strong>Status: unstable</strong></p>
<p>Default Value: 0
<em>(Will not be offset.)</em></p>
<p>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).</p>
</div>
<hr class="docutils" />
<div class="section" id="line-rasterizer">
<h3>line-rasterizer<a class="headerlink" href="#line-rasterizer" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">full</span></code> <code class="docutils literal"><span class="pre">fast</span></code></p>
<p>Default Value: full
<em>(The line will be rendered using the highest quality method rather than the fastest.)</em></p>
<p>Exposes an alternate AGG rendering method that sacrifices some accuracy for speed.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-geometry-transform">
<h3>line-geometry-transform<a class="headerlink" href="#line-geometry-transform" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">functions</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">matrix</span></code> <code class="docutils literal"><span class="pre">translate</span></code> <code class="docutils literal"><span class="pre">scale</span></code> <code class="docutils literal"><span class="pre">rotate</span></code> <code class="docutils literal"><span class="pre">skewX</span></code> <code class="docutils literal"><span class="pre">skewY</span></code></p>
<p>Default Value: none
<em>(The geometry will not be transformed.)</em></p>
<p>Transform line geometry with specified function.</p>
</div>
<hr class="docutils" />
<div class="section" id="line-comp-op">
<h3>line-comp-op<a class="headerlink" href="#line-comp-op" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">clear</span></code> <code class="docutils literal"><span class="pre">src</span></code> <code class="docutils literal"><span class="pre">dst</span></code> <code class="docutils literal"><span class="pre">src-over</span></code> <code class="docutils literal"><span class="pre">dst-over</span></code> <code class="docutils literal"><span class="pre">src-in</span></code> <code class="docutils literal"><span class="pre">dst-in</span></code> <code class="docutils literal"><span class="pre">src-out</span></code> <code class="docutils literal"><span class="pre">dst-out</span></code> <code class="docutils literal"><span class="pre">src-atop</span></code> <code class="docutils literal"><span class="pre">dst-atop</span></code> <code class="docutils literal"><span class="pre">xor</span></code> <code class="docutils literal"><span class="pre">plus</span></code> <code class="docutils literal"><span class="pre">minus</span></code> <code class="docutils literal"><span class="pre">multiply</span></code> <code class="docutils literal"><span class="pre">divide</span></code> <code class="docutils literal"><span class="pre">screen</span></code> <code class="docutils literal"><span class="pre">overlay</span></code> <code class="docutils literal"><span class="pre">darken</span></code> <code class="docutils literal"><span class="pre">lighten</span></code> <code class="docutils literal"><span class="pre">color-dodge</span></code> <code class="docutils literal"><span class="pre">color-burn</span></code> <code class="docutils literal"><span class="pre">linear-dodge</span></code> <code class="docutils literal"><span class="pre">linear-burn</span></code> <code class="docutils literal"><span class="pre">hard-light</span></code> <code class="docutils literal"><span class="pre">soft-light</span></code> <code class="docutils literal"><span class="pre">difference</span></code> <code class="docutils literal"><span class="pre">exclusion</span></code> <code class="docutils literal"><span class="pre">contrast</span></code> <code class="docutils literal"><span class="pre">invert</span></code> <code class="docutils literal"><span class="pre">invert-rgb</span></code> <code class="docutils literal"><span class="pre">grain-merge</span></code> <code class="docutils literal"><span class="pre">grain-extract</span></code> <code class="docutils literal"><span class="pre">hue</span></code> <code class="docutils literal"><span class="pre">saturation</span></code> <code class="docutils literal"><span class="pre">color</span></code> <code class="docutils literal"><span class="pre">value</span></code></p>
<p>Default Value: src-over
<em>(Add the current symbolizer on top of other symbolizer.)</em></p>
<p>Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.</p>
</div>
</div>
<hr class="docutils" />
<div class="section" id="markers">
<h2>markers<a class="headerlink" href="#markers" title="Permalink to this headline">¶</a></h2>
<div class="section" id="marker-file">
<h3>marker-file<a class="headerlink" href="#marker-file" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">uri</span></code></p>
<p>Default Value: none
<em>(An ellipse or circle, if width equals height.)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-opacity">
<h3>marker-opacity<a class="headerlink" href="#marker-opacity" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(The stroke-opacity and fill-opacity of the marker.)</em></p>
<p>The overall opacity of the marker, if set, overrides both the opacity of the fill and the opacity of the stroke.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-fill-opacity">
<h3>marker-fill-opacity<a class="headerlink" href="#marker-fill-opacity" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(Color is fully opaque.)</em></p>
<p>The fill opacity of the marker. This property will also set the <code class="docutils literal"><span class="pre">fill-opacity</span></code> of elements in an SVG loaded from a file.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-line-color">
<h3>marker-line-color<a class="headerlink" href="#marker-line-color" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">color</span></code></p>
<p>Default Value: black
<em>(The marker will be drawn with a black outline.)</em></p>
<p>The color of the stroke around the marker. This property will also set the <code class="docutils literal"><span class="pre">stroke</span></code> of elements in an SVG loaded from a file.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-line-width">
<h3>marker-line-width<a class="headerlink" href="#marker-line-width" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 0.5
<em>(The marker will be drawn with an outline of .5 pixels wide.)</em></p>
<p>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 <code class="docutils literal"><span class="pre">stroke-width</span></code> of elements in an SVG loaded from a file.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-line-opacity">
<h3>marker-line-opacity<a class="headerlink" href="#marker-line-opacity" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 1
<em>(Color is fully opaque. This property will also set the ``stroke-opacity`` of elements in an SVG loaded from a file.)</em></p>
<p>The opacity of a line.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-placement">
<h3>marker-placement<a class="headerlink" href="#marker-placement" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">point</span></code> <code class="docutils literal"><span class="pre">line</span></code> <code class="docutils literal"><span class="pre">interior</span></code> <code class="docutils literal"><span class="pre">vertex-first</span></code> <code class="docutils literal"><span class="pre">vertex-last</span></code></p>
<p>Default Value: point
<em>(Place markers at the center point (centroid) of the geometry.)</em></p>
<p>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.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-multi-policy">
<h3>marker-multi-policy<a class="headerlink" href="#marker-multi-policy" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p>Possible values: <code class="docutils literal"><span class="pre">each</span></code> <code class="docutils literal"><span class="pre">whole</span></code> <code class="docutils literal"><span class="pre">largest</span></code></p>
<p>Default Value: each
<em>(If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each.)</em></p>
<p>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).</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-type">
<h3>marker-type<a class="headerlink" href="#marker-type" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">keyword</span></code></p>
<p><strong>Status: deprecated</strong></p>
<p>Possible values: <code class="docutils literal"><span class="pre">arrow</span></code> <code class="docutils literal"><span class="pre">ellipse</span></code></p>
<p>Default Value: ellipse
<em>(The marker shape is an ellipse.)</em></p>
<p>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).</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-width">
<h3>marker-width<a class="headerlink" href="#marker-width" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 10
<em>(The marker width is 10 pixels.)</em></p>
<p>The width of the marker, if using one of the default types.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-height">
<h3>marker-height<a class="headerlink" href="#marker-height" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">float</span></code></p>
<p>Default Value: 10
<em>(The marker height is 10 pixels.)</em></p>
<p>The height of the marker, if using one of the default types.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-fill">
<h3>marker-fill<a class="headerlink" href="#marker-fill" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">color</span></code></p>
<p>Default Value: blue
<em>(The marker fill color is blue.)</em></p>
<p>The color of the area of the marker. This property will also set the <code class="docutils literal"><span class="pre">fill</span></code> of elements in an SVG loaded from a file.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-allow-overlap">
<h3>marker-allow-overlap<a class="headerlink" href="#marker-allow-overlap" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">boolean</span></code></p>
<p>Default Value: false
<em>(Do not allow markers to overlap with each other - overlapping markers will not be shown.)</em></p>
<p>Control whether overlapping markers are shown or hidden.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-avoid-edges">
<h3>marker-avoid-edges<a class="headerlink" href="#marker-avoid-edges" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">boolean</span></code></p>
<p>Default Value: false
<em>(Markers will be potentially placed near tile edges and therefore may look cut off unless they are rendered on each adjacent tile.)</em></p>
<p>Avoid placing markers that intersect with tile boundaries.</p>
</div>
<hr class="docutils" />
<div class="section" id="marker-ignore-placement">
<h3>marker-ignore-placement<a class="headerlink" href="#marker-ignore-placement" title="Permalink to this headline">¶</a></h3>
<p>Type: <code class="docutils literal"><span class="pre">boolean</span></code></p>
<p>Default Value: false
<em>(do not store the bbox of this geometry in the collisi