-
-
Notifications
You must be signed in to change notification settings - Fork 3
Updating and refactoring the vector tile pipeline #669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+1,640
−1,778
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…outes 1244 transport lines routes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While some tiles haven’t refreshed recently, the root cause in several cases was incomplete imports of relations and objects—likely due to resource constraints. I’ve noticed that after scaling down or restarting certain containers, all objects import correctly
The following actions were taken to improve the data import pipeline into the tiler database: OpenHistoricalMap/issues#1250 (comment)
With these actions, all objects were successfully imported into the database.
On the other hand, I’ve refactored how views are created, improved object simplification logic, standardized handling of gaps in the tiles, and documentation zoom layers
Materiel views creation
Previously, we created materialized views from the generalized tables. While this approach was consistent—since each mview depended explicitly on a specific pre-simplified table—it limited flexibility.
Now, I’ve implemented hierarchical materialized views. For example, mv_landuse_areas_z16_20 is built directly from the raw osm_landuse_polygon table. This view takes about 3–4 minutes to create/refresh, depending on data volume, because it works with unsimplified geometries—but all other columns (like area, languages, and locale tags) are already processed and ready.
The new materialized views for lower zoom levels—such as mv_landuse_areas_z13_15 and mv_landuse_areas_z10_12—are now generated by simplifying mv_landuse_areas_z16_20. also centroids are derived directly from these materialized views. This ensures that polygons and their corresponding centroids always represent the exact same features, maintaining consistency across zoom levels.
Standardized gaps
Previously, our improvements were applied on a per-layer basis—sometimes to amenities, sometime to routes,, sometimes to transport_lines—and we sliced materialized views according to immediate needs. This led to inconsistent geometry handling across zoom levels and simplifications - OpenHistoricalMap/issues#1244
Now I’ve standardized zoom ranges across most layers using consistent intervals: 0–2, 3–5, 6–7, 8–9, 10–12, 13–15, and 16–20, each with its own simplification level.
This ensures a uniform approach and makes it transparent which simplification tolerance is being applied to features at each zoom group.
Documentation for layers.
I’ve added documentation that shows how each layer is structured. This could serve as a first step toward creating more consistent and reusable documentation. https://github.com/OpenHistoricalMap/ohm-deploy/blob/vtiles_admin/DOC-VTILES.md
This RP fixes: OpenHistoricalMap/issues#1250 and OpenHistoricalMap/issues#1244
cc. @1ec5