Styling a layer with an INNER HALO in XMAP.

Styling a layer with an INNER HALO in XMAP.

Background:

There may be times when you need to go beyond the styling of polygons by single or class based values. To achieve this you need to play with the SLD editor. 

In the example below you will find information on creating an inner halo styling effect that is ideal of planning applications or planning policy layers. 

Examples of planning applications being styled with an inner halo. 




















Warning! 
Playing with SLD editor requires a degree of familiarity with XML and SLD tags. We suggest having a look at introduction to SLDs in the first instance, and then progressing onto these examples.


SLD notes:

The SLD file will produce an inner halo in progressively faded (by opacity) red (#ff0000) lines.

There are two scale thresholds set as well (see line 10/11, and line 54/55). 

If you want to change the colour from red, then do a find and replace on #ff0000

Key components of the SLD - 
  1. <CssParameter name="stroke">#ff0000</CssParameter> -- sets the colour of the line
  2. <CssParameter name="stroke-width">5</CssParameter> -- sets the width of the line
  3. <CssParameter name="stroke-opacity">0.25</CssParameter> -- set the opacity of the line
  4. <PerpendicularOffset>-8.0</PerpendicularOffset> -- set the offset value

SLD code:

  1. <?xml version="1.0"?>
  2. <StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  3. <NamedLayer>
  4. <Name>Planning Applications</Name>
  5. <UserStyle>
  6. <Title/>
  7. <Abstract/>
  8. <FeatureTypeStyle>
  9. <Rule>
  10. <MinScaleDenominator>1</MinScaleDenominator>
  11. <MaxScaleDenominator>1250</MaxScaleDenominator>
  12. <LineSymbolizer>
  13. <Stroke>
  14. <CssParameter name="stroke">#ff0000</CssParameter>
  15. <CssParameter name="stroke-width">5</CssParameter>
  16. <CssParameter name="stroke-opacity">0.25</CssParameter>
  17. <CssParameter name="stroke-linecap">bevel</CssParameter>
  18. </Stroke>
  19. <PerpendicularOffset>-8.0</PerpendicularOffset>
  20. </LineSymbolizer>
  21. <LineSymbolizer>
  22. <Stroke>
  23. <CssParameter name="stroke">#ff0000</CssParameter>
  24. <CssParameter name="stroke-width">5</CssParameter>
  25. <CssParameter name="stroke-opacity">0.5</CssParameter>
  26. <CssParameter name="stroke-linecap">bevel</CssParameter>
  27. </Stroke>
  28. <PerpendicularOffset>-5.0</PerpendicularOffset>
  29. </LineSymbolizer>
  30. <LineSymbolizer>
  31. <Stroke>
  32. <CssParameter name="stroke">#ff0000</CssParameter>
  33. <CssParameter name="stroke-width">8</CssParameter>
  34. <CssParameter name="stroke-opacity">0.7</CssParameter>
  35. <CssParameter name="stroke-linecap">bevel</CssParameter>
  36. </Stroke>
  37. <PerpendicularOffset>-2.5</PerpendicularOffset>
  38. </LineSymbolizer>
  39. <PolygonSymbolizer>
  40. <Fill>
  41. <CssParameter name="fill">#ff0000</CssParameter>
  42. <CssParameter name="opacity">0.05</CssParameter>
  43. </Fill>
  44. </PolygonSymbolizer>
  45. <PolygonSymbolizer>
  46. <Stroke>
  47. <CssParameter name="stroke">#000000</CssParameter>
  48. <CssParameter name="stroke-width">2</CssParameter>
  49. <CssParameter name="stroke-linejoin">bevel</CssParameter>
  50. </Stroke>
  51. </PolygonSymbolizer>
  52. </Rule>
  53. <Rule>
  54. <MinScaleDenominator>1251</MinScaleDenominator>
  55. <MaxScaleDenominator>125000</MaxScaleDenominator>
  56. <LineSymbolizer>
  57. <Stroke>
  58. <CssParameter name="stroke">#ff0000</CssParameter>
  59. <CssParameter name="stroke-width">6</CssParameter>
  60. <CssParameter name="stroke-opacity">0.15</CssParameter>
  61. <CssParameter name="stroke-linecap">bevel</CssParameter>
  62. </Stroke>
  63. <PerpendicularOffset>-1.5</PerpendicularOffset>
  64. </LineSymbolizer>
  65. <LineSymbolizer>
  66. <Stroke>
  67. <CssParameter name="stroke">#ff0000</CssParameter>
  68. <CssParameter name="stroke-width">4</CssParameter>
  69. <CssParameter name="stroke-opacity">0.25</CssParameter>
  70. <CssParameter name="stroke-linecap">bevel</CssParameter>
  71. </Stroke>
  72. <PerpendicularOffset>-1.0</PerpendicularOffset>
  73. </LineSymbolizer>
  74. <PolygonSymbolizer>
  75. <Fill>
  76. <CssParameter name="fill">#ff0000</CssParameter>
  77. <CssParameter name="opacity">0.05</CssParameter>
  78. </Fill>
  79. </PolygonSymbolizer>
  80. <PolygonSymbolizer>
  81. <Stroke>
  82. <CssParameter name="stroke">#000000</CssParameter>
  83. <CssParameter name="stroke-width">.75</CssParameter>
  84. <CssParameter name="stroke-linejoin">bevel</CssParameter>
  85. </Stroke>
  86. </PolygonSymbolizer>
  87. </Rule>
  88. </FeatureTypeStyle>
  89. </UserStyle>
  90. </NamedLayer>
  91. </StyledLayerDescriptor>


    • Related Articles

    • Accessing the Admin Panel in XMAP

      Overview The Admin Panel is a platform administrators can use to create and manage user accounts, manage the administration's collections and layers, and input your own data into XMAP. Accessing the Admin Panel Log into XMAP as an administrator. ...
    • 360 (Street View) Viewer in XMAP

      Overview The 360 viewer splits your map view into two, showing your usual map alongside 360 imagery. Accessing 360 Imagery To open the 360 viewer: Zoom into the area you want to view Go to View in the menu Select XMAP 360 Choose your project from the ...
    • Layer Options

      Overview The layer options section of the Data tab allows you to change the scaling, opacity, style or permissions of layers held within your XMAP's database. These options can only be accessed and changed by your XMAP's account administrator. How to ...
    • Connecting to XMAP Layers externally

      Overview XMAP has the functionality to give access to XMAP-hosted Map Layers through three methods: QGIS QLR file (using WFS-T) WMS WFS These options give you the ability to view and edit XMAP-hosted Map Layers in a variety of desktop GIS software. ...
    • Adding Collections in XMAP

      Overview Collections are groups of layers and are displayed to the user as an expandable list. Collections can contain any layers but must contain layers of the same type (base maps or overlays). If you want to create a collection, you can do so ...