I have a VectorTile basemap that I am optimizing, (working on reducing the size of individual tiles), the major chunk of tile size is road data (geometry and attributes). I am working on simplifying the individual road geometries based on the Zoom Level, and aggregating the roads based on zoom levels as well.
The roads are stored in a Postgis table ( individual table for each zoom level ) and I want to aggregate the roads based on the zoom level they will be displayed at. For example, In the Zoom Level 5 table I want to aggregate the roads that are within a certain distance of one another, and make a single line for the road segments:
Since it is not possible to make out individual roads at that zoom level:
How can I aggregate the road geometries based on the distance between road segments?
PS: I am working on PostGIS and QGIS on Linux, but I am open to solutions using any Open Source platform or technology