1

I have geoserver (v2.18.1) serving up MapBox Vector tiles. It works nicely and the data is coming back and rendering on the client. I have the MBTiles plugin installed.

The issue I have is that the protobuf responses containing the date with each tile are very large in size. Some are over 2mb - even with GZip compression turned on. When rendering in OpenLayers the application starts to bog down - not to mention the bandwidth usage.

I've noticed that other online services are (i.e. https://api.maptiler.com) have tile sizes under 200kb. That's a massive difference.

Is there some way to configure Geoserver to filter the data returned to the client based on the zoom level? For example, exclude place names at low zoom levels. I've tried applying an MB Style document but that didn't seem to work.

Is it possible to do a server side filter on the Vector data before returning it to the client?

JT-Hello
  • 23
  • 1
  • 6

1 Answers1

2

Yes, the SLD file associated to your layer is the server-side filter. While the symbolizes are not used, the rules are driving what you see at the zoom levels.

Andrea Aime
  • 1,706
  • 11
  • 16
  • Thanks. Just to clarify. Are the MB Styles to the Layer group or each individual layer? (We are not using the XML SLDs.). – JT-Hello Nov 24 '21 at 12:36
  • So you are using a "style group" definition? I guess that should work the same, but I never tried it. However, if you picked existing MB styles on the internet, they wont' work... they are meant to be applied client side, with data already filtered, so typically they lack the fiters that would trim down data (they don't need it, the data they typically receive is already trimmed). – Andrea Aime Nov 24 '21 at 13:00
  • I now have it working. What I have done is create a number of layer groups each of which contains the relevant layers. Each layer group has a style applied to it which filters the data. Finally, I created one more layer group which combines all of these layer groups into one layer group. (a layer group of layer groups) This way, a single request per tile can be made. – JT-Hello Nov 25 '21 at 08:16