Uploading and updating styles with REST

In Chapter 3, Advanced Styling, you learned a lot about styles and SLD. You used a very powerful extension, the CSS module, to create styles avoiding the complexity of SLD syntax. There are many options to create SLD, and some users prefer using external tools to manage them.

Whatever you prefer to use to create and edit your styles in order to configure a proper visualization, you should upload them on GeoServer and publish them.

REST offers you two resources to manage styles:

  • /styles
  • /workspaces/<ws>/styles

The former points to styles not associated to a workspace while the latter contains the workspaces with associated styles.

Adding a new style is a routine task if you are going to publish data with REST. ...

Get GeoServer Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.