--- license: odbl pretty_name: OSMGraphCLIP-MS training dataset tags: - openstreetmap - geospatial - graph - location-encoding - remote-sensing - contrastive-learning - clip size_categories: - 100K/`, so unzipping **every** shard for a given subset/subfolder combo into that subset's root directory reconstructs the original folder exactly, with no overlap between shards. ### Reconstructing `graphs/` and `bands/` Use `unpack_shards.py` from this repo: ```bash python3 unpack_shards.py h3_ms satclip_ms ``` This walks the given root(s), finds every `*.zip-parts/` directory, and unzips all shards inside it into the parent directory — reconstructing `h3_ms/graphs/`, `h3_ms/bands/`, `satclip_ms/graphs/`, `satclip_ms/bands/`. It's safe to re-run. ## `graphs/` contents For each location, identified by an integer id ``: - `osm__graph.pkl` — a pickled [`torch_geometric.data.HeteroData`](https://pytorch-geometric.readthedocs.io/) object: the heterogeneous OSM graph with node types `polygon` (392-dim features), `line` (390-dim), `point` (386-dim), and all 9 directed edge-type combinations between them (`edge_index` + `edge_attr`). Node features are SBERT (`all-MiniLM-L6-v2`, 384-dim) embeddings of OSM tags augmented with per-type geometric attributes. Built with the GeoLink-derived `osm_to_graph.py` pipeline (`graph_method: geolink`). - `osm__{point,linestring,multilinestring,polygon,multipolygon}.geojson.gz` — the raw gzipped OSM GeoJSON geometries (with tags) that the graph for that location was built from. Not every geometry type is present for every location. - `osm_.nodata` — present instead of the geojson files when no OSM data was found in the location's bounding box. The corresponding graph is still written (an empty `HeteroData`, `method = "zero"` in `dataset.db`), so `` always has a valid graph pickle — `.nodata` just flags "empty, not missing/corrupted". ## `bands/` contents - `osm__bands.npz` — multiscale concentric-ring band features at radii `[2000, 10000, 20000]` meters (see `band_radii_m` in `metadata.json`), keyed by: - `band_radii` — the 3 radii, in meters - `spatial_features` `(3, 47)` + `spatial_feature_names` — per-band aggregate spatial statistics - `subbin_spatial` `(3, 2, 16)` + `subbin_feature_names` — per-band, per-subbin (inner/outer half of the ring) spatial statistics - `sector_spatial` `(3, 4, 11)` + `sector_feature_names` — per-band, per-sector (quadrant) spatial statistics - `global_embeddings` `(3, 384)`, `subbin_embeddings` `(3, 2, 384)`, `sector_embeddings` `(3, 4, 384)` — SBERT embeddings of OSM tags aggregated at the whole-band / subbin / sector level These give the graph encoder multiscale context beyond the single bounding box used for the main graph. ## `dataset.db` A SQLite database indexing every location by id, with three tables (same `id`s line up across tables and against the `osm__*` filenames): - **`downloads`**: `lat`, `lon`, `bbox_size`, `geojson_prefix` (the `osm_` prefix), `timestamp` — one row per raw OSM download. - **`graphs`**: `lat`, `lon`, `bbox_size`, `graph_pickle` (filename), `method` (`geolink` or `zero`), `timestamp` — one row per built graph. - **`band_features`**: `lat`, `lon`, `bands_path` (filename), `band_radii`, `timestamp` — one row per band-feature file. ## `metadata.json` Generation config shared by every sample in the subset: ```json { "bbox_size_m": 1000, "band_radii_m": [2000.0, 10000.0, 20000.0], "location_source": "data/h3_locations.csv", // or data/satclip_locations.csv "tagw_path": "data/all_tags30_frequency1.json", "embedding_backend": "sbert", "graph_method": "geolink" } ``` ## Citation ```bibtex @misc{michail2026osmgraphcliplearninggloballocation, title={OSMGraphCLIP: Learning Global Location Representations from OpenStreetMap Graphs}, author={Dimitrios Michail and Eleni Saka and Ioannis Giannopoulos and Ioannis Papoutsis}, year={2026}, eprint={2606.08046}, archivePrefix={arXiv}, primaryClass={cs.AI}, url={https://arxiv.org/abs/2606.08046}, } ``` ## License and acknowledgements Contains data from [OpenStreetMap](https://www.openstreetmap.org/copyright), © OpenStreetMap contributors, available under the [Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/).