ST_SimplifyPreserveTopology()
slows down tile generation of shortbread style
#43
Labels
shortbread
Issues with the supplied shortbread implementation
The ocean and land layer of the shortbread style use
ST_SimplifyPreserveTopology()
in their layer queries. This function considerably slows down tile generation for me. Some tiles take more than a minute to generate because of that.Given that the ocean layer relies on external data anyway, the MVT geometries could simply be pre-generated. Doing so for zoom 0-12 takes less than 4 hours on my machine and results in about 3GB of data. That means the data could even be pre-generated once a night when new coastlines arrive. Zoom 13 and 14 should probably better off holding the original OSM data. If that is still too much data, a global simplify over the entire (unified) water_polygon table should only take a couple of minutes.
The land layer is a bit more tricky because it needs to be minutely updated. Just speculating but how about a generated column which is filled with a simplified geometry, but only iff the geometry is too large to reasonably handle (ST_MemSize is a great function for quickly estimating how big the polygons are). Then use
coalesce(simplified_way, way)
to get reasonably sized data.The text was updated successfully, but these errors were encountered: