Modifying layer styling in GeoServer - AtlasOfLivingAustralia/layer-ingestion GitHub Wiki

Layers served as WMS tiles via GoeServer are styled with a SLD file. The styles are programatically generated and sometime need modifying. This is a step-by-step tutorial on how to do this.

Identify the layer name

Edit the SLD in GeoServer

  • Browse to the ALA GeoServer instance: http://spatial.ala.org.au/geoserver
  • Login as "admin" (ask Nick or Dave for password)
  • Click the "Styles" link in the left hand menu (Data section)
  • Search for the short name (e.g. "raini") and click on the correct entry
  • You should be on the "Style Editor" page for the requested layer, so go ahead and edit the SLD XML (make a backup by copy/paste of text to your local machine first)
  • Click the "Validate" button and scroll to top of the screen for any error messages.
  • If XML is valid, then click the "Submit" button to save changes

Clear cached tiles from GeoServer

  • Navigate to the "GeoWebCache" page via the link in the left hand menu (Settings section)
  • Click the link at top of page called "Go to the GWC Demos Page"
  • Use the browser search function to find the layer name on the page (its a very long page) and click the link under the layer name labelled "Seed this layer"
  • Under the "Type of operation:" entry, select the "Truncate - remove tiles" option
  • For each of the four combinations, once selected, click submit:
    • Format
    • Grid Set

Test the changes

  • Go into the Spatial Portal and load the layer. If the changes are not apparent, then clear the browser cache or else view a single tile by itself and hit "shift + reload".