.. index::
   single: STYLE

.. _style:

*****************************************************************************
 STYLE
*****************************************************************************

Style holds parameters for symbolization and styling.  Multiple styles
may be applied within a :ref:`CLASS` or :ref:`LABEL`.

This object appeared in 4.0 and the intention is to separate logic
from looks.  The final intent is to have named styles (**Not yet
supported**) that will be re-usable through the mapfile. This is the
way of defining the appearance of an object (a :ref:`CLASS` or a
:ref:`LABEL`).

.. index::
   pair: STYLE; ANGLE

ANGLE [double|attribute|AUTO]
    Angle, given in degrees, to rotate the symbol (counter clockwise).
    Default is 0 (no rotation).  If you have an attribute that
    specifies angles in a clockwise direction (compass direction), you
    have to adjust the angle attribute values before they reach
    MapServer  (360-ANGLE), as it is not possible to use a mathematical
    expression for `ANGLE`.

    - For points, it specifies the rotation of the symbol around its
      center.
    - For decorated lines, the behaviour depends on the value of
      the `GAP` element.

      - For negative `GAP` values it specifies the rotation of the
        decoration symbol relative to the direction of the line.
        An angle of 0 means that the symbol's x-axis is oriented
        along the direction of the line.
      - For non-negativ (or absent) `GAP` values it specifies the
        rotation of the decoration symbol around its center.
        An angle of 0 means that the symbol is not rotated.
    - For polygons, it specifies the angle of the lines in a HATCH
      symbol (0 - horizontal lines), or it specifies the rotation
      of the symbol used to generate the pattern in a polygon fill
      (it does not specify the rotation of the fill as a whole).
      For its use with hatched lines, see Example #7 in the
      :ref:`symbology examples <sym_examples>`.
    - [*attribute*] was introduced in version 5.0, to specify the
      attribute to use for angle values. The hard brackets [] are
      required. For example, if your data source has an attribute
      named "MYROTATE" that holds angle values for each feature, your
      STYLE object for hatched lines might contain:

      .. code-block:: mapfile

        STYLE
          SYMBOL 'hatch-test'
          COLOR 255 0 0
          ANGLE [MYROTATE]
          SIZE 4.0
          WIDTH 3.0
        END

      The associated RFC document for this feature is :ref:`RFC19`.
    - The `AUTO` keyword was added in version 5.4, and currently only
      applies when coupled with the `GEOMTRANSFORM` keyword.

ANGLEITEM [string]
    ANGLE[attribute] must now be used instead.

    .. deprecated:: 5.0

.. index::
   pair: STYLE; ANTIALIAS

ANTIALIAS [true|false]
    Should TrueType fonts be antialiased.  Only useful for GD (gif)
    rendering.  Default is false.  Has no effect for the other
    renderers (where anti-aliasing can not be turned off).

    .. warning::

       GD support was removed in MapServer 7.0.

.. index::
   pair: STYLE; BACKGROUNDCOLOR

BACKGROUNDCOLOR [r] [g] [b] | [hexadecimal string] - `deprecated`
    Color to use for non-transparent symbols.

    .. note::

       Multiple `STYLE`\s can be used instead:

       .. code-block:: mapfile

         STYLE
           BACKGROUNDCOLOR 0 0 0
           SYMBOL "foo"
           COLOR 255 0 0
         END

       can be replaced with:

       .. code-block:: mapfile

         STYLE
           COLOR 0 0 0
         END
         STYLE
           SYMBOL "foo"
           COLOR 255 0 0
         END
  
    .. deprecated:: 6.2

.. index::
   pair: STYLE; COLOR

COLOR [r] [g] [b] | [hexadecimal string] | [attribute]
    Color to use for drawing features. 

    - `r`, `g` and `b` shall be integers [0..255].  To specify green,
      the following is used:

        .. code-block:: mapfile

           COLOR 0 255 0

    - `hexadecimal string` can be

      - RGB value: "#rrggbb".  To specify magenta, the following is
        used:

        .. code-block:: mapfile

           COLOR "#FF00FF"

      - RGBA value (adding translucence): "#rrggbbaa".  To specify a
        semi-translucent magenta, the following is used:

        .. code-block:: mapfile

           COLOR "#FF00FFCC"

    - [*attribute*] was introduced in version 5.0, to specify the
      attribute to use for color values.  The hard brackets [] are
      required.  For example, if your data set has an attribute named
      "MYPAINT" that holds color values for each record, use:
      object for might contain:

      .. code-block:: mapfile

         COLOR [MYPAINT]

      If `COLOR` is not specified, and it is not a :ref:`symbol` of
      `TYPE` `pixmap`, then the symbol will not be rendered.

      The associated RFC document for this feature is :ref:`RFC19`.

.. index::
   pair: STYLE; COLORRANGE

COLORRANGE [r] [g] [b] [r] [g] [b] | [hexadecimal string] [hexadecimal string]
    Defines two colors to correspond to the low
    and high ends of the ``DATARANGE`` values. Colors are
    mapped to a continuous linear gradient between the
    two values. 
    
    See :ref:`kerneldensity` for further details on applying these to raster layers, 
    and :ref:`RFC6` for working with vector layers. 
    

.. index::
   pair: STYLE; DATARANGE

DATARANGE [integer|double] [integer|double]
    Defines two values, a low value and a high value, that Mapserver will map to
    the color range defined by the `COLORRANGE` entry.
    Values must be integers or doubles. Colors are
    mapped to a continuous linear gradient between the
    two values. 
    
    See :ref:`kerneldensity` for further details on applying these to raster layers, 
    and :ref:`RFC6` for working with vector layers. 

.. index::
   pair: STYLE; GAP

GAP [double]
    `GAP` specifies the distance between `SYMBOL`\s (center to center)
    for decorated lines and polygon fills in layer `SIZEUNITS`.  For
    polygon fills, `GAP` specifies the distance between `SYMBOL`\s in
    both the X and the Y direction.
    For lines, the centers of the `SYMBOL`\s are placed on the line.
    As of MapServer 5.0 this also applies to PixMap symbols.

    When scaling of symbols is in effect (`SYMBOLSCALEDENOM` is
    specified for the :ref:`LAYER`), `GAP` specifies the distance in
    layer `SIZEUNITS` at the map scale 1:`SYMBOLSCALEDENOM`.

    - For lines, if `INITIALGAP` is not specified, the first symbol
      will be placed `GAP`/2 from the start of the line.
    - For lines, a negative `GAP` value will cause the symbols' X axis
      to be aligned relative to the tangent of the line.
    - For lines, a positive `GAP` value aligns the symbols' X axis
      relative to the X axis of the output device.
    - For lines, a `GAP` of 0 (the default value) will cause the symbols
      to be rendered edge to edge
    - For polygons, a missing `GAP` or a `GAP` of less than or equal
      to the size of the symbol will cause the symbols to be rendered
      edge to edge.

    Symbols can be rotated using `ANGLE`.

    .. versionadded:: 6.0 moved from :ref:`SYMBOL`

    .. note::

      The behaviour of `GAP` has not been stable over time.  It has
      specified the amount of space between the symbols, and also
      something in between the amount of space between the symbols and
      the center to center distance.  Since 6.2 `GAP` specifies the
      center to center distance between the symbols.

.. index::
   pair: STYLE; GEOMTRANSFORM

.. index::
   triple: STYLE; GEOMTRANSFORM; bbox

.. index::
   triple: STYLE; GEOMTRANSFORM; centroid

.. index::
   triple: STYLE; GEOMTRANSFORM; end

.. index::
   triple: STYLE; GEOMTRANSFORM; expression

.. index::
   triple: STYLE; GEOMTRANSFORM; labelpnt

.. index::
   triple: STYLE; GEOMTRANSFORM; labelpoly

.. index::
   triple: STYLE; GEOMTRANSFORM; start

.. index::
   triple: STYLE; GEOMTRANSFORM; vertices

GEOMTRANSFORM [bbox|centroid|end|labelpnt|labelpoly|start|vertices|<expression>]
    Used to indicate that the current feature will be transformed
    before the actual style is applied. Introduced in version 5.4.

    - *bbox*: produces the bounding box of the current feature
      geometry.
    - *centroid*: produces the centroid of the current feature
      geometry.
    - *end*: produces the last point of the current feature
      geometry. When used with `ANGLE` AUTO, it can for instance be
      used to render arrowheads on line segments.
    - *labelpnt*: used for :ref:`LABEL` styles.  Draws a marker on 
      the geographic position the label is attached to. This 
      corresponds to the center of the label text only if the label 
      is in position CC. 
    - *labelpoly*: used for :ref:`LABEL` styles.  Produces a polygon
      that covers the label plus a 1 pixel padding.
    - *start*: produces the first point of the current feature
      geometry. When used with `ANGLE` AUTO, it can for instance be
      used to render arrow tails on line segments.
    - *vertices*: produces all the intermediate vertices (points) of
      the current feature geometry (the start and end are excluded).
      When used with `ANGLE` AUTO, the marker is oriented by the half
      angle formed by the two adjacent line segments.
    - *<expression>*: Applies the given expression to the geometry.
      Supported expressions:

      .. index::
         triple: STYLE; GEOMTRANSFORM; buffer

      - *(buffer([shape],dist))*: Buffer the geometry (`[shape]`) using
        `dist` pixels as buffer distance.  For polygons, a negative
        `dist` will produce a setback.

      .. index::
         triple: STYLE; GEOMTRANSFORM; generalize

      - *(generalize([shape],tolerance))*: simplifies a geometry (`[shape]`)
        in way comparable to FME's ThinNoPoint algorithm. See 
        http://trac.osgeo.org/gdal/ticket/966 for more information.
 
      .. note::
 
         Depends on GEOS.

      .. index::
         triple: STYLE; GEOMTRANSFORM; simplify

      - *(simplify([shape],tolerance))*: simplifies a geometry (`[shape]`) using
        the standard Douglas-Peucker algorithm.

      .. index::
         triple: STYLE; GEOMTRANSFORM; simpifypt

      - *(simplifypt([shape],tolerance))*: simplifies a geometry (`[shape]`),
        ensuring that the result is a valid geometry having the same 
        dimension and number of components as the input. `tolerance` must be
        non-negative.

      .. index::
         triple: STYLE; GEOMTRANSFORM; smoothsia

      - *(smoothsia([shape], smoothing_size, smoothing_iteration, preprocessing))*:
        will smooth a geometry (`[shape]`) using the SIA algorithm

      Example (polygon data set) - draw a two pixel wide line 5
      pixels inside the boundary of the polygon:

      .. code-block:: mapfile

         STYLE
           OUTLINECOLOR 255 0 0
           WIDTH 2
           GEOMTRANSFORM (buffer([shape],-5))
         END

    There is a difference between STYLE and LAYER GEOMTRANSFORM.
    LAYER-level will receive ground coordinates (meters, degrees, etc)
    and STYLE-level will receive pixel coordinates. The argument to
    methods such as simplify() must be in the same units as the
    coordinates of the shapes at that point of the rendering workflow,
    i.e. pixels at the STYLE-level and in ground units at the
    LAYER-level.

    .. code-block:: mapfile

        LAYER NAME "my_layer"
            TYPE LINE
            STATUS DEFAULT
            DATA "lines.shp"
            GEOMTRANSFORM (simplify([shape], 10))  ## 10 ground units
            CLASS
                STYLE
                    GEOMTRANSFORM (buffer([shape], 5)  ## 5 pixels
                    WIDTH 2
                    COLOR 255 0 0
                END
            END
        END

    .. seealso::

       :ref:`geomtransform`

.. index::
   pair: STYLE; INITIALGAP

INITIALGAP [double]
    `INITIALGAP` is useful for styling dashed lines.

    If used with `GAP`, `INITIALGAP` specifies the distance to the
    first symbol on a styled line.
    
    If used with `PATTERN`, `INITIALGAP` specifies the distance to
    the first dash on a dashed line.

    Example 1 - dashed line styled with circles:

    .. code-block:: mapfile
    
      STYLE
        COLOR 0 0 0
        WIDTH 4
        PATTERN 40 10 END
      END
      STYLE
        SYMBOL "circlef"
        COLOR 0 0 0
        SIZE 8
        INITIALGAP 20
        GAP 50
      END

    Example 1 - dashed line styled with dashed line overlay:

    .. code-block:: mapfile
    
      STYLE
        COLOR 0 0 0
        WIDTH 6
        PATTERN 40 10 END
      END
      STYLE
        COLOR 255 255 255
        WIDTH 4 
        INITIALGAP 2
        PATTERN 36 14 END
      END

    .. versionadded:: 6.2

.. index::
   pair: STYLE; LINECAP

.. index::
   triple: STYLE; LINECAP; butt

.. index::
   triple: STYLE; LINECAP; round

.. index::
   triple: STYLE; LINECAP; square

LINECAP [butt|round|square]
    Sets the line cap type for lines. Default is `round`.  See
    :ref:`sym_construction` for explanation and examples.

    .. versionadded:: 6.0 moved from :ref:`SYMBOL`

.. index::
   pair: STYLE; LINEJOIN

.. index::
   triple: STYLE; LINEJOIN; round

.. index::
   triple: STYLE; LINEJOIN; miter

.. index::
   triple: STYLE; LINEJOIN; bevel

LINEJOIN [round|miter|bevel|none]
    Sets the line join type for lines. Default is `round`.  See
    :ref:`sym_construction` for explanation and examples.

    .. versionadded:: 6.0 moved from :ref:`SYMBOL`

.. index::
   pair: STYLE; LINEJOINMAXSIZE

LINEJOINMAXSIZE [int]
    Sets the max length of the `miter` `LINEJOIN` type. The value
    represents a coefficient which multiplies a current symbol
    size. Default is 3.  See :ref:`sym_construction` for explanation
    and examples.

    .. versionadded:: 6.0 moved from :ref:`SYMBOL`

.. index::
   pair: STYLE; MAXSCALEDENOM
    
MAXSCALEDENOM [double]
    Minimum scale at which this :ref:`STYLE` is drawn. Scale is given
    as the denominator of the actual scale fraction, for example for a
    map at a scale of 1:24,000 use 24000.

    .. versionadded:: 5.4

    .. seealso::
        
       :term:`Map Scale`

.. index::
   pair: STYLE; MAXSIZE

MAXSIZE [double]
    Maximum size in pixels to draw a symbol. Default is 500.  Starting
    from version 5.4, the value can also be a decimal value (and not
    only integer).
    See :ref:`LAYER` :ref:`SYMBOLSCALEDENOM <symbolscaledenom>`.

.. index::
   pair: STYLE; MAXWIDTH

MAXWIDTH [double]
    Maximum width in pixels to draw the line work. Default is 32.
    Starting from version 5.4, the value can also be a decimal value
    (and not only integer).
    See :ref:`LAYER` :ref:`SYMBOLSCALEDENOM <symbolscaledenom>`.

.. index::
   pair: STYLE; MINSCALEDENOM
    
MINSCALEDENOM [double]
    Maximum scale at which this :ref:`STYLE` is drawn. Scale is given
    as the denominator of the actual scale fraction, for example for a
    map at a scale of 1:24,000 use 24000.

    .. versionadded:: 5.4

    .. seealso::
        
       :term:`Map Scale`

.. index::
   pair: STYLE; MINSIZE

MINSIZE [double]
    Minimum size in pixels to draw a symbol. Default is 0.  Starting
    from version 5.4, the value can also be a decimal value (and not
    only integer).
    See :ref:`LAYER` :ref:`SYMBOLSCALEDENOM <symbolscaledenom>`.

.. index::
   pair: STYLE; MINWIDTH

MINWIDTH [double]
    Minimum width in pixels to draw the line work. Default is 0.
    Starting from version 5.4, the value can also be a decimal value
    (and not only integer).
    See :ref:`LAYER` :ref:`SYMBOLSCALEDENOM <symbolscaledenom>`.

.. index::
   pair: STYLE; OFFSET

OFFSET [double|attribute] [double|attribute]
    Geometry offset values in layer `SIZEUNITS`. In the general
    case, `SIZEUNITS` will be pixels. The first parameter corresponds
    to a shift on the horizontal - `x`, and the second parameter to
    and a shift on the vertical - `y`. 

    When scaling of symbols is in effect (`SYMBOLSCALEDENOM` is
    specified for the :ref:`LAYER`), `OFFSET` gives offset values in
    layer `SIZEUNITS` at the map scale 1:`SYMBOLSCALEDENOM`.

    An `OFFSET` of `20` `40` will shift the geometry 20 `SIZEUNITS` to
    the left and 40 `SIZEUNITS` down before rendering.

    For lines, an `OFFSET` of `y` = `-99` will produce a line geometry
    that is shifted `x` SIZEUNITS perpendicular to the original line
    geometry.  A positive `x` shifts the line to the right when seen
    along the direction of the line.  A negative `x` shifts the line
    to the left when seen along the direction of the line.
    
    For lines, an `OFFSET` of `y` = `-999` (added in version 6.4) will
    produce a multiline geometry corresponding to the borders of a line
    that is `x` `SIZEUNITS` wide. This can be used to render only the
    outlines of a thick line.

.. index::
   pair: STYLE; OPACITY

OPACITY [integer|attribute]
    Opacity to draw the current style (applies to 5.2+, :ref:`AGG`
    only, does not apply to pixmap symbols)

    - [*attribute*]  was introduced in version 5.6, to specify the
      attribute to use for opacity values.

.. index::
   pair: STYLE; OUTLINECOLOR

OUTLINECOLOR [r] [g] [b] | [hexadecimal string] | [attribute]
    Color to use for outlining polygons and certain marker symbols
    (`ellipse`, `vector` polygons and `truetype`).  Has no effect for
    lines.  The width of the outline can be specified using `WIDTH`.
    If no `WIDTH` is specified, an outline of one pixel will be drawn.

    If there is a `SYMBOL` defined for the `STYLE`, the `OUTLINECOLOR`
    will be used to create an outline for that `SYMBOL` (only
    `ellipse`, `truetype` and polygon `vector` symbols will get an
    outline).  If there is no `SYMBOL` defined for the `STYLE`, the
    polygon will get an outline.

    - `r`, `g` and `b` shall be integers [0..255].  To specify green,
      the following is used:

      .. code-block:: mapfile

         OUTLINECOLOR 0 255 0
         WIDTH 3.0
         
    - `hexadecimal string` can be

      - RGB value: "#rrggbb".  To specify magenta, the following is
        used:

        .. code-block:: mapfile

           OUTLINECOLOR "#FF00FF"

      - RGBA value (adding translucence): "#rrggbbaa".  To specify a
        semi-translucent magenta, the following is used:

        .. code-block:: mapfile

           OUTLINECOLOR "#FF00FFCC"         

    - [*attribute*] was introduced in version 5.0, to specify the
      attribute to use for color values.  The hard brackets [] are
      required.  For example, if your data set has an attribute named
      "MYPAINT" that holds color values for each record, use:
      object for might contain:

      .. code-block:: mapfile

         OUTLINECOLOR [MYPAINT]

      The associated RFC document for this feature is :ref:`RFC19`.

.. index::
   pair: STYLE; OUTLINEWIDTH

OUTLINEWIDTH [double|attribute]
    Width in pixels for the outline.  Default is 0.0.  The thickness
    of the outline will not depend on the scale.

    .. versionadded:: 5.4

.. index::
   pair: STYLE; PATTERN

PATTERN [double on] [double off] [double on] [double off] ... END
    Used to define a dash pattern for line work (lines, polygon
    outlines, hatch lines, ...).  The numbers (doubles) specify the
    lengths of the dashes and gaps of the dash pattern in layer
    `SIZEUNITS`.
    When scaling of symbols is in effect (`SYMBOLSCALEDENOM` is
    specified for the :ref:`LAYER`), the numbers specify the lengths
    of the dashes and gaps in layer `SIZEUNITS` at the map scale
    1:`SYMBOLSCALEDENOM`.

    `LINECAP`, `LINEJOIN` and `LINEJOINMAXSIZE` can be used to control
    the appearance of the dashed lines.

    To specify a dashed line that is 5 units wide, with dash lengths
    of 5 units and gaps of 5 units, the following style can be used:

      .. code-block:: mapfile

        STYLE
          COLOR 0 0 0
          WIDTH 5.0
          LINECAP BUTT
          PATTERN 5.0 5.0 END
        END

    Since version 6.2, `PATTERN` can be used to create dashed lines
    for :ref:`symbol`\s of `TYPE` `hatch`.  Patterns for hatches are
    always drawn with `LINECAP` `butt`.  The patterns are generated
    relative to the edges of the bounding box of the polygon (an
    illustrated example can be found in the :ref:`hatch fill section
    of the symbol construction document <construction_hatch_fill>`).

    .. versionadded:: 6.0 moved from :ref:`SYMBOL`

.. index::
   pair: STYLE; POLAROFFSET

POLAROFFSET [double|attribute] [double|attribute]
    Offset given in polar coordinates.

    The first parameter is a double value in layer `SIZEUNITS` (or the
    name of a layer attribute) that specifies the radius/distance.

    The second parameter is a double value (or the name of a layer
    attribute) that specifies the angle (counter clockwise).

    When scaling of symbols is in effect (`SYMBOLSCALEDENOM` is
    specified for the :ref:`LAYER`), `POLAROFFSET` gives the
    distance in layer `SIZEUNITS` at the map scale
    1:`SYMBOLSCALEDENOM`.

    A `POLAROFFSET` of `20` `40` will shift the geometry to a position
    that is 20 `SIZEUNITS` away along a line that is at an angle of 40
    degrees with a line that goes horizontally to the right.

    When `POLAROFFSET` is used with layers that have `CONNECTIONTYPE`
    `uvraster` (:ref:`vector field <input_vector_field>`), the special
    attributes `uv_length`, `uv_length_2`, `uv_angle` and
    `uv_minus_angle` are available, making it convenient to specify
    arrow heads and tails.  Example:

    .. code-block:: mapfile

      LAYER
        ...
        TYPE POINT 
        CONNECTIONTYPE uvraster
        ...
        CLASS
          STYLE
            SYMBOL "arrowbody"
            ANGLE [uv_angle]
            SIZE [uv_length]
            WIDTH 3
            COLOR 100 255 0
          END
          STYLE
            SYMBOL "arrowhead"
            ANGLE [uv_angle]
            SIZE 10
            COLOR 255 0 0
            POLAROFFSET [uv_length_2] [uv_angle]
          END
          STYLE
            SYMBOL "arrowtail"
            ANGLE [uv_angle]
            SIZE 10
            COLOR 255 0 0
            POLAROFFSET [uv_length_2] [uv_minus_angle]
          END
        END #class
      END #layer

    .. versionadded:: 6.2 (:ref:`rfc78`)

.. index::
   pair: STYLE; RANGEITEM 

RANGEITEM [attribute]

    Specifies the attribute that will be used to
    map colors between the high and low ends of the
    `COLORRANGE` entry.  Colors are mapped to a
    continuous linear gradient between the two values.

    Here is an example mapping the values 0.0-1.0 to RED-GREEN:

    .. code-block:: mapfile

      STYLE
          RANGEITEM "myAttr"
          COLORRANGE 255 0 0  0 255 0
          DATARANGE 0.0 1.0
      END

    See the associated RFC document :ref:`RFC6`.

.. index::
   pair: STYLE; SIZE

SIZE [double|attribute]
    Height, in layer `SIZEUNITS`, of the symbol/pattern to be used.
    Default value depends on the :ref:`symbol` `TYPE`.  For `pixmap`:
    the height (in pixels) of the pixmap; for `ellipse` and `vector`:
    the maximum y value of the :ref:`symbol` `POINTS` parameter, for
    `hatch`: 1.0, for `truetype`: 1.0.

    When scaling of symbols is in effect (`SYMBOLSCALEDENOM` is
    specified for the :ref:`LAYER`), `SIZE` gives the height, in layer
    `SIZEUNITS`, of the symbol/pattern to be used at the map scale
    1:`SYMBOLSCALEDENOM`.

    - For symbols of `TYPE` `hatch`, the `SIZE` is the center to
      center distance between the lines. For its use with hatched
      lines, see Example#8 in the
      :ref:`symbology examples <sym_examples>`.
    - [*attribute*] was introduced in version 5.0, to specify the
      attribute to use for size values.
      The hard brackets [] are required.
      For example, if your data set has an attribute named "MYHEIGHT"
      that holds size values for each feature, your STYLE object for
      hatched lines might contain:

      .. code-block:: mapfile

        STYLE
          SYMBOL 'hatch-test'
          COLOR 255 0 0
          ANGLE 45
          SIZE [MYHEIGHT]
          WIDTH 3.0
        END

      The associated RFC document for this feature is :ref:`RFC19`.
    - Starting from version 5.4, the value can also be a decimal
      value (and not only integer).

.. index::
   pair: STYLE; SYMBOL

SYMBOL [integer|string|filename|url|attribute]
    The symbol to use for rendering the features.

    - Integer is the index of the symbol in the symbol set, starting
      at 1 (the 5th symbol is symbol number 5).

    - String is the name of the symbol (as defined using the
      :ref:`symbol` `NAME` parameter).

    - Filename specifies the path to a file containing a symbol.  For
      example a PNG file.  Specify the path relative to the directory
      containing the mapfile.

    - URL specifies the address of a file containing a pixmap symbol.
      For example a PNG file.  A URL must start with "http"::

        SYMBOL "http://myserver.org/path/to/file.png"

      .. versionadded:: 6.0

    - [attribute] allows individual rendering of features by using an
      attribute in the dataset that specifies the symbol name (as
      defined in the :ref:`symbol` `NAME` parameter).  The hard
      brackets [] are required.

      .. versionadded:: 5.6

    If `SYMBOL` is not specified, the behaviour depends on the type of
    feature.

    - For points, nothing will be rendered.

    - For lines, `SYMBOL` is only relevant if you want to style the
      lines using symbols, so the absence of `SYMBOL` means that you
      will get lines as specified using the relevant line rendering
      parameters (`COLOR`, `WIDTH`, `PATTERN`, `LINECAP`, ...).

    - For polygons, the interior of the polygons will be rendered
      using a solid fill of the color specified in the `COLOR`
      parameter.

    .. seealso::

       :ref:`symbol`

.. index::
   pair: STYLE; WIDTH

WIDTH [double|attribute]
    `WIDTH` refers to the thickness of line work drawn, in layer
    `SIZEUNITS`.  Default is 1.0.

    When scaling of symbols is in effect (`SYMBOLSCALEDENOM` is
    specified for the :ref:`LAYER`), `WIDTH` refers to the thickness
    of the line work in layer `SIZEUNITS` at the map scale
    1:`SYMBOLSCALEDENOM`.

    - If used with `SYMBOL` and `OUTLINECOLOR`, `WIDTH` specifies the
      width of the symbol outlines.  This applies to :ref:`SYMBOL`
      `TYPE` `vector` (polygons), `ellipse` and `truetype`.
    - For lines, `WIDTH` specifies the width of the line.
    - For polygons, if used with `OUTLINECOLOR`, `WIDTH` specifies the
      thickness of the polygon outline.
    - For a symbol of :ref:`SYMBOL` `TYPE` `hatch`, `WIDTH`
      specifies the thickness of the hatched lines.
      For its use with hatched lines, see Example #7 in the
      :ref:`symbology examples <sym_examples>`.
    - [*attribute*] was added in version 5.4 to specify the attribute
      to use for the width value. The hard brackets [] are required.
    - Starting from version 5.4, the value can also be a decimal
      value (and not only integer).
