OGC API - Styles¶
A OGC Styles API based on the early draft of this specification.
This service describes, retrieves and updates the styles present on the server. Styles are cross linked with their associated collections in both the Features and Tiles API.
OGC API - Styles Implementation status¶
| OGC API - Styles | Version | Implementation status |
|---|---|---|
| Part 1: Core | Draft | Implementation based on early specification draft. |
Installing the GeoServer OGC API - Styles module¶
-
Login, and navigate to About & Status > About GeoServer and check Build Information to determine the exact version of GeoServer you are running.
-
Visit the website download page, change the Development tab, and locate the nightly release that corresponds to the GeoServer you are running.
Follow the Community Modules link and download
ogcapi-styleszip archive.- 3.1.0-SNAPSHOT example: ogcapi-styles
The website lists active nightly builds to provide feedback to developers, you may also browse for earlier branches.
-
Extract the contents of the archive into the
WEB-INF/libdirectory in GeoServer.Warning
Verify that the version number in the filename corresponds to the version of GeoServer you are running (for example geoserver-3.1.0-SNAPSHOT-ogcapi-styles-plugin.zip above).
-
Restart GeoServer.
On restart the services are listed at http://localhost:8080/geoserver
Configuration of OGC API - Styles module¶
The module exposes all available GeoServer styles. Its settings are on the Services > Styles page in the admin UI, on the Styles tab.
Conformance classes¶
Use the provided Conformance table to manage the conformance classes.
The service always supports reading styles, as Mapbox styles, SLD 1.0 and SLD 1.1. These classes are always enabled and are listed in the conformance declaration.
The Manage styles conformance class allows clients to create, update and delete styles, and to update style metadata. It is disabled by default.
Managing styles changes the GeoServer catalog, so decide who may do it before enabling the class. Service security rules control this, in Security > Services or in security/services.properties. A good starting point allows only administrators:
styles.addStyle=ROLE_ADMINISTRATOR
styles.updateStyle=ROLE_ADMINISTRATOR
styles.deleteStyle=ROLE_ADMINISTRATOR
styles.updateStyleMetadata=ROLE_ADMINISTRATOR
styles.patchStyleMetadata=ROLE_ADMINISTRATOR
Add other roles to these rules to allow more users to manage styles. Use a rule for each operation, as above: a styles.* rule also applies to the operations that read styles.