[Geoserver-users] Seeking Advice: TIle Caching (mapbox vector) & CQL_Filter

Hi All,

After a LONG time away from Geoserver I am now back working with it and hopefully for a long while yet :slight_smile:

We have a layer that has around 200 different “network_id” values in there and we are looking at the implications of the following when using vector tiles:

CQL_FILTER=network_id in (1,2,3)
CQL_FILTER=network_id in (1)

CQL_FILTER=network_id in (22,57,23,178)

CQL_FILTER=network_id in (12,58,66,81.94.122.,146,178,201)

Or explained another way, users can choose which networks they want to show as a combination of any off the 200 available networks - and the CQL_FILTER is what updates.

Many of our networks are HUGE - they are road networks indicating where vehicles can be driven in Australia. We are not talking about small data here. The data is also living data, so we will want to refresh (either reseed or truncate) fairly frequently.

I’ll leave if there rather than “lead the witness” but would really appreciate any advice on why this approach is horrible, good, are there limitations it will hit or what is a better way of doing this (and yes, it MUST be vector tile).

Many thanks & good to be back on the Geoserver bandwagon.
Andrew

It feels like you missed the point of vector tiles - which was to let the clients to this work :slightly_smiling_face:

If you wish to be kind you can pre the data for the clients:

  1. Consider using the “new” ability to update feature type with a dynamically created value; and then make a column using a CQL expression.

  2. Then in your vector tile included the resulting column

  3. And then let the client side do the logic to select

···

But really if they are going to choose, let them choose … on the client. Serve the same “complete” dataset up to all clients so they can take advantage of caching and “economies of scale”…

Jody Garnett