1

I have an entire Spain agronomic parcels layer in a PostgreDB and I´m triying to serve it through GeoServer.

I split by villages to improve the speed of the petitions, but how can I serve all the territory with one client petition (and quickly)?

My machine is an ubuntu 18 google machine. In postgres, "spain table" is divided by village (+5000 tables). All of these are in geoserver gruped by province (state) (50 groups). My first idea was group the 50 groups in one and call it, but is very low (minutes to load in the client web.

How can I do that?

I'm going to try with geowebcache but I'm not sure it can pregenerate the enormous amount of tiles.

  • 1
    What type of machine are you using? Memory CPU OS? How have you prepared the data in the database? – Ian Turton Sep 15 at 16:18
  • I have an ubuntu 18 google machine. In postgres, "spain table" is divided by village (+5000 tables). All of these are in geoserver gruped by province (state) (50 groups). My first idea was group the 50 groups in one and call it, but is very low (minutes to load in the client web. How can I do? I'm going to try with geowebcache but I'm not sure it can pregenerate the enormous amount of tiles – Alex_knd Sep 15 at 18:10
  • Are you really using WMS, or WMTS? WMTS would be better as it defines the tiles that are available to the client, rather than the client telling the WMS server which image(s) (tiles) it wants to generate. This means that with WMTS, the cache is actually useful, whereas with WMS, the cache doesn't really help unless the client just happens to request the exact same tiling scheme (eg, origin, tile size, etc) as the server has already cached. WMS is really designed for single-image requests and usually required on-the-fly rendering of the images. WMTS is designed for multi-tile requests. – Son of a Beach Sep 15 at 23:33
1

I would put all of my data in a single table and make sure that it had a spatial index on the geometry column and conventional indexes on any attribute that you use for searching or in the style.

I would then make sure the style prevented anyone drawing the layer at a scale above village size. No one needs to see the map for the whole country (the fields would be too small to distinguish) so no need to plan for that.

Using GeoWebCache to cache the output tile is useful if many people visit the same area regularly. You don't need to worry about precaching as GeoWebCache will fill the cache as needed when users request an area for the first time. There are probably parts of the country that no one will ever visit. As noted in the comments make sure you switch your client to use the WMTS protocol if you go down this route.

Finally, make sure you have worked through the GeoServer in Production notes and the tuning PostGreSQL/PostGIS notes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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