0

I need to cluster polygons that are close to each other. Like Point Stacker transformation does but for polygons. https://docs.geoserver.org/latest/en/user/styling/sld/extensions/rendering-transform.html

I need to see clusters with number of objects in it when map is zoomed out and separate polygons when zoom in.

I know that this can be done in Leaflet. To use WMS from GeoServer. But I want to know if clustering can be done on GeoServer itself.

Is there any way to do that?

1 Answer 1

1

The easy way to do this is to cluster the polygon centroid points when you are zoomed out and display the polygons when you are zoomed in. This is achieved with MinScaleDenominator and MaxScaleDenominator in the SLD style.

Alternatively, you could write an extension to the point clustering code.

1
  • Yeah, thanks! I had that idea as well before checking Point Stacker function for my polygon layer. And I was surprised but is actually works the same way as for points. Commented Sep 2 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.