0

I'm not sure if this is possible within Geoserver so wanted to ping to the community. I have a table in a database (~3m rows), this table has a column of counts in it and I want to thematically shade the data by Equal Count or Equal Range or % buckets (such as 0-25%, 25-50%, 50%-75%, 75%-100%) using ONLY the data being returned in the Bounding Box.

I do not want to hardcode the count ranges (Low: 0-100, Med: 100-200, High: 200-300) into the SLD because if I move the map to an area where the counts are quite low I'll end up with all similar colours (for example if the area only has counts < 100 then it'll all be one colour) where in reality I want to see color range within the set of data being returned. E.g: If the colour range from the bounding box is 1-50 I want to be able to show Low/Med/High using Equal Count/Ranges applied to that 1-50 range.

I wasn't sure if this was possible within Geoserver and before I try to embark on this I wanted to check.

Hope that makes sense?

Many thanks, Ben

Tried reading the documentation and searching but couldn't find the answer I was looking for.

1 Answers1

0

You can use the extension SLD Rest Service to do this.

The SLD Service is a GeoServer REST service that can be used to create SLD styles on published GeoServer layers doing a classification on the layer data, following user provided directives.

The purpose of the service is to allow clients to dynamically publish data and create simple styles on it.

Ian Turton
  • 10,018
  • 1
  • 28
  • 47
  • Ah thank you Ian! So I've installed the gs-sldservice-2.19.3.jar and xom-1.1.jar to the C:\Program Files\GeoServer\webapps\geoserver\WEB-INF\lib location and restarted the service. I then checked .../geoserver/rest/ webpage but I only see the service sldservice/capabilities...have I missed a step in the installation process ? – Ben Crane Feb 23 '23 at 14:50
  • I'm not sure that I have ever actually used it - does it respond to the rest requests? – Ian Turton Feb 23 '23 at 15:21