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](https://github.com/ohrie/portal-streuobst/tree/main/data-processing) PBF >
Osmium > Gdal > Tippecanoe
- Americana https://wiki.openstreetmap.org/wiki/OpenStreetMap_Americana
Uses Planetiler.
**Ideal setup ideas:**
- Ideally, I would like to use PMtiles, which I can just put somewhere and
reference from my vector map.
- Ideally, I would like to use [tippecanoe
](https://github.com/felt/tippecanoe) to create the PMtiles because for most
projects, the Tippecanoe magic of generalization is enough to get a usable
result.
- Ideally, there would be a way to pass the data from OSM2PGSQL directly to
Tippecanoe or with a minimal and storage-efficient intermediate step.
- It would be perfect if there were a way to run the OSM2PGSQL process without
relying on a database at all; or one that I can create self-contained in the
processing Docker image and that can be deleted after the PMtile files are
created.
**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.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/discussions/2463
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/repo-discussions/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving