No description
|
Vojtěch Fošnár
a35ac78313
feat: fullpass — sandboxed OSM full-history SQL API
Raw SQL over OSM full-history parquet (element versions + changeset created_by), served by a Rust axum+DuckDB backend. DuckDB sandboxed: read-only, no filesystem or network beyond the data dir, per-query resource caps + timeout. /api/query for raw SQL, / reserved for a UI. |
||
|---|---|---|
| api | feat: fullpass — sandboxed OSM full-history SQL API | |
| .gitignore | feat: fullpass — sandboxed OSM full-history SQL API | |
| filter_changesets.py | feat: fullpass — sandboxed OSM full-history SQL API | |
| flake.lock | feat: fullpass — sandboxed OSM full-history SQL API | |
| flake.nix | feat: fullpass — sandboxed OSM full-history SQL API | |
| README.md | feat: fullpass — sandboxed OSM full-history SQL API | |
Fullpass
Public full-history query API for OpenStreetMap — like Postpass, but every element
version (not just the latest), joined to changeset metadata (created_by editor, user,
hashtags). Built so apps can query user edit history in any shape (e.g. gamify / reward
contributors). Scoped to a regional extract (initially Czech Republic).
POST /api/query with {"sql": "..."} → JSON rows. Raw SQL over a sandboxed DuckDB
(read-only, no filesystem/network beyond the data dir, per-query resource caps + timeout).
/ is reserved for a static UI.
How it works
- contributions parquet — one row per element version, built by
ohsome-planet from a Geofabrik
*-internal.osh.pbffull-history extract. - changesets parquet —
id → editor, user, hashtags, sourced from the OSM changeset dump, refreshed independently (changeset replication). - Query-time join
contributions.changeset.id = changesets.id.
Example
-- distinct elements each mapper touched via a tool matching 'iD', all history
SELECTc.user.nameASmapper,count(DISTINCT(c.osm_type,c.osm_id))ASelementsFROMcontributionscJOINchangesetscsONc.changeset.id=cs.idWHEREcs.editorLIKE'iD%'GROUPBYc.user.nameORDERBYelementsDESCLIMIT5;Layout
api/— the Rust service (axum + DuckDB).filter_changesets.py— stream-filter the global changeset dump to a regional id subset.