Replies: 1 comment 2 replies
-
|
The goal of osm2pgsql is to import OSM data into a postgis database and keep it updated. If your ideal setup doesn't have a database and you're only after daily updates, why are you starting with osm2pgsql? You certainly can create an osm2pgsql database and export a planet's worth of vector tiles, but why? It's going to take much longer than a setup optimized for generating the planet like tilemaker or planetiler. I happen to believe the flex API is more powerful than the configuration options other software has, and the combination of the power of the flex API and PostGIS gives an osm2pgsql-based toolchain far more power. This does not matter for someone looking for a simple way to generate tiles. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe someone already has this set up and can share something.
And if not, maybe this is something to think about…
Kontext:
It is very easy to host static websites (GitHub Pages etc.) and static files (S3 etc.). It is a lot harder to host a tile server (etc.).
We have more and more OSM Community projects that create topic-specific data for vector maps and exports.
Right now, the tooling that osm2pgsql provides for this is still quite complex (for good reasons and optimized for those reasons).
Constraint: To keep things simple, I am only looking for data updates maybe every 6-12 hours or daily, but not minutely.
Question:
What is the simplest setup I can run to create daily PMtiles for a data set using osm2pgsql to handle my data processing?
Examples:
TILDA https://github.com/FixMyBerlin/tilda-geo
Daily PBF > Osmium tag filter > osm2pgsql > DB > DB-Functions (for Generalization) > Martin > Vectortile Endpoints > Filesystem Cache
This system works great for TILDA but is way too complex for a hobby project.
OpenRailwayMap Vector https://github.com/hiddewie/OpenRailwayMap-vector
I did not investigate the system in detail but it looks like they use Martin to create mbtiles and then create pmtiles from them.
Streuobstwiesen Karte https://github.com/ohrie/portal-streuobst, https://portal-streuobst.de/karte/#6/51.166/10.452
AFAIK the process is PBF > Osmium > Gdal > Tippecanoe
Americana https://wiki.openstreetmap.org/wiki/OpenStreetMap_Americana
Uses Planetiler.
Ideal setup ideas:
Output formats
Some of those processes above only focus on the vector tile output (using different methods). That is a very valid constraint to simplify the process when the result is "just" a visual map. But many of the projects I see coming up can and should also consider the exportable data form their pipeline part of their assets. This is the great thing we have when running the current osm2pgsql setup, we already have the database to export from. This is an aspect we could ideally preserve. The question is, how to do this in a file based mindset. Pmtiles are not the right format here, but GeoParquet files look like a good candidate to fill this gap.
I know quite a few pieces of this puzzle are not how things are now. But we will be seeing many new vector-based map projects in the near future, and many of them could run a similar pipeline. It would be great if more OSM projects would use a similar approach so contributing will be easy, and the projects work under similar constraints but also have similar capabilities.
Beta Was this translation helpful? Give feedback.
All reactions