Developing a GeoServer Extension for Clustering and Vector Tiles with Caching

Hello everyone,

I am a master’s student in Turkey working on my thesis related to GeoServer. I am developing a new extension, but I am stuck at a certain point. I noticed some GitHub commits from experienced contributors, so I thought I could ask for guidance here. Any help would be greatly appreciated.

I am trying to develop an extension that clusters point data based on the zoom level and serves it as vector tiles. My goal is to connect to a PostGIS database and send a custom SQL query based on the z, x, and y values coming from the browser. Additionally, I want to integrate GeoServer’s caching mechanism to cache the data based on these z, x, and y values.

I have implemented this using the GeoServer REST API, but I couldn’t make use of the caching mechanism. How can I develop this extension properly? Could you provide any guidance or point me in the right direction?

Thank you in advance for your help!

In general the REST api is used for administration of GeoServer rather than serving data. It sounds as though you need to create a new datasource or process. You will probably want to look at the GeoTools (the library GeoServer is built with) examples for CustomDataStores (https://docs.geotools.org/latest/userguide/tutorial/datastore/index.html) and Processes (https://docs.geotools.org/latest/userguide/tutorial/process.html). You might also want to check out the PointStacker process (https://github.com/geotools/geotools/blob/main/modules/unsupported/process-feature/src/main/java/org/geotools/process/vector/PointStackerProcess.java) which does something similar to what (I think) you are trying to do.

Ian

Hİ Ian ,
Thank you for your answer. You haven’t written a new datastore. Can’t I intervene and edit SQL with the existing vector tile extention without making a request to Postgis?