...
Add new styles (SLD)
Info By default, GeoServer only supports styles through the use of SLD (Styled Layers Descriptor) standard files. Lots of examples and documentation can be found at http://docs.geoserver.org/2.8.3/user/styling/sld-cookbook/index.html
Div align left - Navigate to “Styles” and press the “Add new style” button
- Give your style a new name
- Paste your SLD into the text area or choose file to upload from your local computer
- Validate your style by pressing the “Validate” button
- Only submit your style if the validation retrieves no errors (like the next example)
- Publish a new layer
There are several possibilities to publish layers in Geoserver which are mainly related to the type of the data source you will be feeding GeoServer with. In the following section three procedures will be described:
- Publish data that has been imported (by using GIS desktop systems or command line tools) into the spatial database (schema: spatial) shipped with Union VMS
- .
- Publish data that has been imported into a
- spatial database
- Publish a shapefile
Div align left Publish data imported into UnionVMS Spatial DB
- Navigate to “Layers” and press the “Add new resource” button
- In the next screen, choose “uvms:uvmsdb” option
- From the list, choose the table you wish to publish (e.g. countries)
- Make your layer specific settings:
- In the Data tab:
- Accept all defaults
- In the “Bounding Boxes” section press the “Compute from data” and “Compute from native bounds” options
- In the Publishing tab:
- Set the default style (this style should have been previously imported to Geoserver, e.g. countries)
- In the UnionVMS application multiple styles for the same layer are supported. Normally it supports up to three different styles:
- Only geometry (normally set as the default style)
- Geometry with labels
- Only labels
- If you have more than one style for a layer, drag the remaining styles (styles previously imported to Geoserver) into the “Selected styles” section (e.g. countries_label and countries_label_geom)
- In the Data tab:
- Finally, press the “Save” button