osm/saint_paul_mn/theme_vectors/Themes
47 themed GeoPackages, one per subject
The lossless cut. Every feature goes to its primary theme's file, plus a secondary theme's when another tag matches. Columns: theme, class, subclass, tags as JSON.
- Units
- OSM features; see the theme's class and subclass columns
- Licence
- ODbL-1.0 (© OpenStreetMap contributors, https://www.openstreetmap.org/copyright)
- Source
- OpenStreetMap contributors, via the planet GeoParquet of openplanetdata.com (build 2026-10-27), clipped to the ee_r264 region and classified with linneabean.osm (osm_themes.csv, osm_theme_rules.csv).
- Description
- OpenStreetMap features intersecting the ee_r264 region saint_paul_mn, assigned to one of 47 themes by linneabean.osm's precedence rules (osm_theme_rules.csv). theme_vectors/ holds one GeoPackage per theme, in layers points / lines / polygons / collections with columns theme, class, subclass, is_primary, theme_other, the theme's tag columns and all tags as JSON; a feature with a secondary theme is in both themes' files. The rasters are presence, distance and density products of the themes on the 10-arcsecond pyramid grid over the region's bounding box, in derived_rasters/. product_vectors/ holds the merged single-geometry GeoPackages built from the themes (linneabean.osm.osm_products).
- Code
- base_data/osm/osm_processing/run_osm_processing.py (linneabean/osm/osm_tasks.py)
Processing steps
OpenStreetMap features intersecting the city of Saint Paul, Minnesota, sorted into 47 themes, merged into ten single-geometry products and rasterised on the 10-arcsecond grid, from the openplanetdata.com planet build of 2026-10-27.
How these files are made (base_data/osm/osm_base_data_ingestion.py, a ProjectFlow run file whose tasks live in linneabean/osm/osm_tasks.py; this script is a thin entry point that runs it, and regions whose files exist are skipped):
- Region polygon (osm_<region>_region.gpkg). Saint Paul is not an ee_r264 region, so its boundary was looked up in the planet file itself: the polygon tagged boundary=administrative, admin_level=8, name=Saint Paul inside the search box -93.25,44.85,-92.95,45.05. The polygon is written once with its definition (region_source, region_query, search_bbox) and every later step reads its extent from it.
- Themes (theme_vectors/). One streaming pass over the planet GeoParquet of openplanetdata.com (build 2026-10-27, openplanetdata.com/planet; the full planet, 204 GB, kept in osm/raw/ and never uploaded), pruned to the row groups that overlap the region, clipped to the polygon. Every feature is classified by the precedence-ordered rules in linneabean/osm/osm_theme_rules.csv into one of 47 themes (linneabean/osm/osm_themes.csv: theme, domain, ISIC rev.4 section) with a class (the matched tag’s value) and a subclass (a refining tag such as admin_level, voltage, cuisine or damage grade). A feature whose other tags match a later rule of a different theme is also written to that secondary theme’s file, so a bakery in a building is in retail and in buildings, flagged by is_primary and theme_other. Features no rule catches land in the theme “other”. Each theme is one GeoPackage with layers points, lines, polygons and collections, the theme’s tag columns and all tags as JSON.
- Products (product_vectors/). The themes merged into ten files with one geometry type and one layer each (linneabean/osm/osm_products.py): facilities, buildings, landcover, landcover_mosaic, boundaries, settlements, transport_lines, water_lines, utility_lines, utility_nodes. Polygons become representative points where the product is points (with area_m2), boundary edge ways are dropped in favour of the relation polygons, building survey points are joined onto the footprint they fall in or given an estimated square footprint, and the landcover mosaic resolves overlaps so the smaller feature keeps the ground. Lifecycle state (construction, proposed, disused, …), damage and flood_prone are columns, not categories. Every row keeps osm_type, osm_id and geometry_source.
- Rasters (derived_rasters/). Presence of roads, main roads, energy features, power lines and buildings; distance in metres to roads and to main roads; building density in a 5-cell window, burnt on the 10-arcsecond pyramid grid over the region’s bounding box and expanded to global-extent POGs when listed.
- Listing. hb.add_directory_to_base_data lists every file in osm_<region>_base_data_manifest.csv with its licence (ODbL-1.0, (c) OpenStreetMap contributors), source, description and variable class, and ends with the publishing dry run.
What is in each theme, tag by tag, is documented in linneabean/osm/osm_themes_readme.md; the thematic structure and the products in linneabean/osm/readme.md. Counts and the tag vocabulary differ by region: a country built from imports and a city mapped by its residents look different, and the residual theme “other” shows what the rules miss.
From the ingestion script that made these files, base_data/osm/saint_paul_mn/osm_saint_paul_mn_base_data_ingestion.py.