openmaptiles-tools icon indicating copy to clipboard operation
openmaptiles-tools copied to clipboard

Optimize Postserve for low zooms

Open nyurik opened this issue 6 years ago • 4 comments

Running MVT generation on low zoom could go as long as an hour for z0. By default, Postserve should have an alternative source of z0-z4 to make it usable for debugging, e.g. take a simple geojson country outline and generate fake tiles from that?

nyurik avatar Oct 25 '19 07:10 nyurik

@nyurik, Can you elaborate on the pros and cons of having an alternative source vs. further generalization of the higher zoom levels down to zoom 0?

zstadler avatar Oct 27 '19 15:10 zstadler

@zstadler the issue I see now is that Postserve is useless for low-zoom viewing if you have the whole planet in the database. I have to do all sorts of tricks to view the map at the higher zooms from the start - otherwise the database goes into low zoom generation, and gets frozen for hours.

There are 3 paths I see to solve this:

  • set minzoom to z6 (?) in the dynamically generated metadata (already works with MIN_ZOOM env variable)
  • use some simplified way to generate country outlines for low-zooms (possibly specifying that only water or border layer should be used?)
  • create a new materialized view for pre-caching low-zoom tiles. The getmvt function would use that view instead of generating it.

nyurik avatar Oct 27 '19 16:10 nyurik

I don`t get the issue here.

Currently master renders the z0 tile at performance levels similar to high zoom levels like. This is for a default OSM import and openmaptiles tile schema.

If you add or edit layers, then performance will likely also change. It is your own job to ensure tile complexity for lower zoom levels is not too heavy.

kristfal avatar Feb 18 '20 09:02 kristfal

IHMO I think you should cache the tiles on top of postserve.

frodrigo avatar Feb 18 '20 09:02 frodrigo