NoeFlandre's picture
v0.3.0: + Russia (10 districts) + Central America + missing US states/territories (310 units, 16.3M polygons)
1924806 verified
|
Raw
History Blame Contribute Delete
19.6 kB
metadata
license: odbl
task_categories:
  - other
language:
  - en
tags:
  - geospatial
  - openstreetmap
  - osm
  - polygons
  - landuse
  - landcover
  - remote-sensing
  - foundation-model
size_categories:
  - 1M<n<10M

osm-polygon-selection dataset

A curated set of OpenStreetMap polygons from 310 geographic unitssovereign countries plus sub-country regions like Brazilian states, Chinese provinces, Indian zones, US states, Canadian provinces, Japanese regions, and Indonesian islands — classified by size bin (small / medium / large, area in [0.1, 100] km²) and tagged by continent (Natural Earth admin0 lookup).

Size bins:

  • small — area in [0.1, 1) km² (10,000 m² to 1 km², roughly 100 m × 100 m to ~1 km × 1 km). Examples: a city block, a small park, a single farm field, a small wood lot, a residential courtyard, a parking lot, an industrial yard.
  • medium — area in [1, 10) km² (1 km² to 10 km², roughly 1 km × 1 km to 3 km × 3 km). Examples: a large park, a small village/town footprint, a reservoir, a forest patch, an industrial zone, a golf course, a cemetery, a nature reserve.
  • large — area in [10, 100] km² (10 km² to 100 km², roughly 3 km × 3 km to 10 km × 10 km). Examples: a large forest, a big lake, an entire town or small city, a large military training area, a national park section, a sizable agricultural region.

Polygons smaller than 0.1 km² (most individual buildings, houses, small ponds, single fields) and larger than 100 km² (whole countries, mountain ranges, big seas) are excluded by the size filter (see Filter chain below).

Status: All 310 geographic units are extracted end-to-end.

Total polygons: 16,297,690 (combined parquet: combined/all_world.parquet).

Coverage

This dataset processes one parquet per Geofabrik PBF region. Each region is bucketed in per_country/ as either a sovereign country or a sub-country region (state, province, federal district, island group, zone):

unit type count examples
Sovereign country ~170 france, ghana, japan, peru, australia, brazil, argentina
Sub-country region ~130 brazil-sudeste, china-beijing, japan-kanto, india-central-zone, us-texas, canada-ontario, russia-siberian-fed-district
Multi-country bundle ~10 gcc-states, ireland-and-northern-ireland, senegal-and-gambia, haiti-and-domrep, malaysia-singapore-brunei, israel-and-palestine

Total: 310 geographic units across all 6 inhabited continents plus Oceania. The 310 is not the count of sovereign states (which is ~195 per the UN); it's the count of discrete Geofabrik PBF regions we processed.

Layout

This dataset is split across five subfolders so you can pull only what you need:

folder what's inside typical size
per_country/ one folder per country with <country>.parquet + README.md ~28 GB total, <1 MB per small country
combined/ all_world.parquet — every polygon in one file ~14 GB
splits/ train.parquet, val.parquet, test.parquet — pre-filtered split parquets (no split column needed) ~13 GB total
sample/ sample_map.jsonl — ~18k representative polygons for quick viz ~3 MB
preview/ map_preview.png — static map thumbnail ~1 MB

Start with sample/ or preview/ for a quick look. Pull per_country/<country>/<country>.parquet for a single-country study. Use combined/all_world.parquet for cross-country work or splits/<train/val/test>.parquet for ML training with the pre-defined 80/10/10 stratified-by-country split (seed=42).

What's in this dataset

Each row is one OSM polygon (closed way or multipolygon relation) that passed our filter chain (see below). The polygon geometry itself is included in the row as WKT (or WKB if OSM_POLYGON_GEOMETRY=wkb is set when the dataset is built) so you can render, query, or reproject it directly without re-deriving from centroid+area.

column type description
osm_id int64 OSM object id (int64).
osm_type string OSM object type, "way" or "relation" (string).
centroid_lon float64 polygon centroid longitude (WGS84, float64).
centroid_lat float64 polygon centroid latitude (WGS84, float64).
area_km2 float64 polygon area in km² (Web Mercator, float64).
tags list(string) OSM key=value tags (list of strings).
matched_tag string the first tag in tags that hit the whitelist (string, the reason the polygon survived).
continent string Natural Earth admin0 lookup of the centroid (string).
size_bin string "small" (0.1-1), "medium" (1-10), or "large" (10-100) km² (string).
country string ISO-style country name (string).
extract_status string "clean" (extract ran to completion) or "killed" (extract was interrupted) (string).
pbf_date string date of the source PBF file (string, from mtime).
geometry_wkt string polygon geometry as WKT (WGS84, string). Parse with shapely.wkt.loads(row.geometry_wkt).

Provenance

  • Pipeline version: v0.1.0
  • Git SHA: d69b105c41732c72c2162d737e3353b95bcbdfbf
  • Built: 2026-07-06T23:15:51.406227
  • Source: Geofabrik regional extracts (https://download.geofabrik.de/)
  • Whitelist: 22,075 OSM key=value tags from osm-stats (see docs/whitelist_decisions.md in the project repo, or read the full rationale in the blog post). The whitelist is designed to filter polygons by landuse-style tags (natural, landuse, leisure, amenity, etc.) so the dataset focuses on physical land-cover / land-use features rather than buildings, addresses, or points of interest.

Geographic distribution

polygon distribution across the dataset's countries

(Each circle is one polygon from the sample/ folder, color-coded by country. Circle size is proportional to sqrt(area_km2).)

Size-bin distribution (full dataset)

Counts every polygon in the 16,297,690-polygon dataset by size_bin, computed directly from combined/all_world.parquet via pyarrow.compute.value_counts. Percentages are exact ratios over the entire dataset, not a sample.

size_bin count pct
small 12,474,300 76.5%
medium 3,294,828 20.2%
large 528,562 3.2%
Total 16,297,690 100.0%

Example row

Here is one concrete row from the Liechtenstein parquet file (a natural=* polygon, fully filled-in with all 13 columns):

column value
osm_id 1342399548
osm_type way
centroid_lon 9.513440
centroid_lat 47.070405
area_km2 0.3202
tags natural=grassland
matched_tag natural=grassland
continent Europe
size_bin small
country liechtenstein
extract_status clean
pbf_date 2026-06-26
geometry_wkt MULTIPOLYGON (((9.5109116 47.0686582, 9.5111015 47.0686316, 9.5112088 47.0685293, 9.5112785 47.06...

This row is representative: the full-dataset distribution above shows ~80% small, ~18% medium, ~2% large, and the dominant whitelist tag families (natural=*, landuse=*, leisure=*) account for the majority of matched_tag values.

Filter chain

Each polygon in this dataset has passed three filters:

  1. Size filter (Stage 0): area in [0.1, 100] km². Polygons smaller than 0.1 km² or larger than 100 km² are dropped.
  2. Whitelist filter (Stage 2): at least one OSM tag in the 22,075-tag whitelist. The whitelist is derived from a clustering of OSM tags across both tfidf and embeddings analyses.
  3. Classify (Stage 3): continent assigned via Natural Earth admin0 shapefile, size_bin assigned by area.

Train / val / test split

Every row in every parquet (per_country/<country>/<country>.parquet and combined/all_world.parquet) carries a split column with one of three values: train, val, or test.

split ratio polygons
train 80% 13,037,271
val 10% 1,628,432
test 10% 1,631,987
Total 100% 16,297,690

The split is stratified by country: each country's rows are assigned to train/val/test independently using a global numpy.random.default_rng seeded once with 42 and offset per country. The exact counts per country and the seed are recorded in splits/split_manifest.json.

To load only one split (e.g. for training), filter in pyarrow:

import pyarrow.compute as pc
import pyarrow.parquet as pq
table = pq.read_table("combined/all_world.parquet")
train = table.filter(pc.equal(table["split"], "train"))

The split is deterministic and re-runnable:

uv run python scripts/make_split.py            # default seed=42, 80/10/10
uv run python scripts/make_split.py --seed 7   # different reproducible split

Per-country summary

Country Polygons Status
afghanistan 15,821 clean
albania 14,738 clean
algeria 32,601 clean
american-oceania 627 clean
andorra 776 clean
angola 19,197 clean
argentina 193,648 clean
armenia 7,720 clean
australia 115,145 clean
austria 133,711 clean
azerbaijan 15,826 clean
azores 2,640 clean
bahamas 2,882 clean
bangladesh 11,444 clean
belarus 223,750 clean
belgium 125,108 clean
belize 12,972 clean
benin 4,614 clean
bhutan 8,769 clean
bolivia 30,701 clean
bosnia-herzegovina 49,715 clean
botswana 5,327 clean
brazil-centro-oeste 58,137 clean
brazil-nordeste 46,565 clean
brazil-norte 46,154 clean
brazil-sudeste 59,249 clean
brazil-sul 65,807 clean
bulgaria 74,567 clean
burkina-faso 8,835 clean
burundi 4,659 clean
cambodia 4,374 clean
cameroon 71,789 clean
canada-alberta 134,835 clean
canada-british-columbia 148,372 clean
canada-manitoba 104,499 clean
canada-new-brunswick 16,313 clean
canada-newfoundland-and-labrador 91,841 clean
canada-northwest-territories 246,014 clean
canada-nova-scotia 23,043 clean
canada-ontario 182,052 clean
canada-prince-edward-island 4,579 clean
canada-quebec 251,374 clean
canada-saskatchewan 57,366 clean
canada-yukon 34,726 clean
canary-islands 2,560 clean
cape-verde 2,417 clean
central-african-republic 53,491 clean
chad 23,667 clean
chile 71,739 clean
china-anhui 17,945 clean
china-beijing 15,710 clean
china-chongqing 6,062 clean
china-fujian 13,047 clean
china-gansu 31,162 clean
china-guangdong 27,368 clean
china-guangxi 13,033 clean
china-guizhou 8,079 clean
china-hainan 4,158 clean
china-hebei 63,656 clean
china-heilongjiang 37,555 clean
china-henan 18,109 clean
china-hong-kong 1,519 clean
china-hubei 16,705 clean
china-hunan 13,182 clean
china-inner-mongolia 28,927 clean
china-jiangsu 29,605 clean
china-jiangxi 15,265 clean
china-jilin 16,150 clean
china-liaoning 12,329 clean
china-macau 90 clean
china-ningxia 6,196 clean
china-qinghai 7,691 clean
china-shaanxi 28,916 clean
china-shandong 49,948 clean
china-shanghai 5,564 clean
china-shanxi 14,141 clean
china-sichuan 22,246 clean
china-tianjin 8,836 clean
china-tibet 24,681 clean
china-xinjiang 34,254 clean
china-yunnan 16,805 clean
china-zhejiang 30,185 clean
colombia 36,412 clean
comores 395 clean
congo-brazzaville 6,643 clean
congo-democratic-republic 85,106 clean
costa-rica 7,476 clean
croatia 47,140 clean
cuba 23,386 clean
cyprus 4,846 clean
czech-republic 271,062 clean
denmark 175,795 clean
djibouti 576 clean
east-timor 1,553 clean
ecuador 16,139 clean
egypt 24,623 clean
el-salvador 3,517 clean
equatorial-guinea 1,004 clean
eritrea 3,278 clean
estonia 47,160 clean
ethiopia 29,663 clean
faroe-islands 1,278 clean
fiji 3,093 clean
finland 427,870 clean
france 492,538 clean
gabon 3,843 clean
gcc-states 59,856 clean
georgia 21,198 clean
germany 1,131,888 clean
ghana 11,445 clean
greece 45,142 clean
greenland 15,132 clean
guernsey-jersey 670 clean
guinea 12,311 clean
guinea-bissau 2,109 clean
guyana 2,192 clean
haiti-and-domrep 4,604 clean
honduras 6,160 clean
hungary 77,569 clean
iceland 47,896 clean
india-central-zone 51,347 clean
india-eastern-zone 21,480 clean
india-north-eastern-zone 12,160 clean
india-northern-zone 50,862 clean
india-southern-zone 66,323 clean
india-western-zone 39,173 clean
indonesia-java 10,582 clean
indonesia-kalimantan 7,663 clean
indonesia-maluku 3,800 clean
indonesia-nusa-tenggara 7,778 clean
indonesia-papua 4,208 clean
indonesia-sulawesi 5,805 clean
indonesia-sumatra 10,121 clean
iran 57,028 clean
iraq 26,861 clean
ireland-and-northern-ireland 159,879 clean
isle-of-man 2,648 clean
israel-and-palestine 13,681 clean
italy 276,991 clean
ivory-coast 14,273 clean
jamaica 1,865 clean
japan-chubu 14,376 clean
japan-chugoku 10,128 clean
japan-hokkaido 18,638 clean
japan-kansai 9,902 clean
japan-kanto 16,024 clean
japan-kyushu 23,846 clean
japan-shikoku 4,686 clean
japan-tohoku 18,838 clean
jordan 4,078 clean
kazakhstan 78,493 clean
kenya 16,916 clean
kiribati 584 clean
kosovo 5,377 clean
kyrgyzstan 17,110 clean
laos 6,380 clean
latvia 47,133 clean
lebanon 4,289 clean
lesotho 19,246 clean
liberia 2,342 clean
libya 13,046 clean
liechtenstein 565 clean
lithuania 76,550 clean
luxembourg 11,460 clean
macedonia 9,330 clean
madagascar 22,664 clean
malawi 5,337 clean
malaysia-singapore-brunei 20,439 clean
maldives 2,358 clean
mali 40,392 clean
malta 620 clean
marshall-islands 628 clean
mauritania 9,040 clean
mauritius 1,863 clean
mayotte 606 clean
mexico 68,967 clean
micronesia 755 clean
moldova 35,690 clean
monaco 2 clean
mongolia 10,941 clean
montenegro 11,785 clean
morocco 42,623 clean
mozambique 11,101 clean
myanmar 32,570 clean
namibia 9,316 clean
nepal 68,869 clean
netherlands 207,459 clean
new-caledonia 2,141 clean
new-zealand 127,834 clean
nicaragua 10,633 clean
niger 14,606 clean
nigeria 33,059 clean
north-korea 19,295 clean
norway 413,801 clean
pakistan 36,200 clean
panama 6,663 clean
papua-new-guinea 9,006 clean
paraguay 29,619 clean
peru 26,038 clean
philippines 36,555 clean
poland 637,908 clean
polynesie-francaise 2,195 clean
portugal 66,287 clean
romania 115,401 clean
russia-central-fed-district 315,956 clean
russia-crimean-fed-district 20,645 clean
russia-far-eastern-fed-district 192,337 clean
russia-kaliningrad 12,432 clean
russia-north-caucasus-fed-district 52,352 clean
russia-northwestern-fed-district 381,413 clean
russia-siberian-fed-district 291,830 clean
russia-south-fed-district 166,644 clean
russia-ural-fed-district 184,300 clean
russia-volga-fed-district 237,169 clean
rwanda 3,976 clean
saint-helena-ascension-and-tristan-da-cunha 174 clean
samoa 369 clean
sao-tome-and-principe 190 clean
senegal-and-gambia 20,479 clean
serbia 47,189 clean
seychelles 264 clean
sierra-leone 3,366 clean
slovakia 54,888 clean
slovenia 41,526 clean
solomon-islands 4,575 clean
somalia 48,453 clean
south-africa 120,252 clean
south-korea 39,039 clean
south-sudan 17,091 clean
spain 240,230 clean
sri-lanka 13,748 clean
sudan 38,043 clean
suriname 9,410 clean
swaziland 4,113 clean
sweden 397,661 clean
switzerland 61,156 clean
syria 21,603 clean
taiwan 14,124 clean
tajikistan 24,831 clean
tanzania 16,046 clean
thailand 32,789 clean
togo 3,408 clean
tonga 916 clean
tunisia 8,498 clean
turkey 113,609 clean
turkmenistan 6,353 clean
uganda 10,449 clean
ukraine 645,578 clean
united-kingdom 205,002 clean
uruguay 10,051 clean
us-alabama 28,004 clean
us-alaska 62,521 clean
us-arizona 38,727 clean
us-arkansas 18,513 clean
us-california 51,998 clean
us-colorado 61,550 clean
us-connecticut 12,802 clean
us-delaware 7,255 clean
us-district-of-columbia 564 clean
us-florida 229,464 clean
us-georgia 29,945 clean
us-hawaii 2,619 clean
us-idaho 17,217 clean
us-illinois 79,460 clean
us-indiana 42,034 clean
us-iowa 30,362 clean
us-kansas 56,789 clean
us-kentucky 12,179 clean
us-louisiana 17,618 clean
us-maine 17,529 clean
us-maryland 24,684 clean
us-massachusetts 22,134 clean
us-michigan 73,209 clean
us-minnesota 72,441 clean
us-mississippi 7,704 clean
us-missouri 48,147 clean
us-montana 18,606 clean
us-nebraska 31,375 clean
us-nevada 14,207 clean
us-new-hampshire 11,186 clean
us-new-jersey 28,145 clean
us-new-mexico 21,070 clean
us-new-york 42,871 clean
us-north-carolina 36,095 clean
us-north-dakota 14,275 clean
us-ohio 117,344 clean
us-oklahoma 13,752 clean
us-oregon 45,342 clean
us-pennsylvania 44,038 clean
us-puerto-rico 2,318 clean
us-rhode-island 6,360 clean
us-south-carolina 20,613 clean
us-south-dakota 11,975 clean
us-tennessee 22,002 clean
us-texas 82,221 clean
us-utah 22,027 clean
us-vermont 7,452 clean
us-virgin-islands 193 clean
us-virginia 33,844 clean
us-washington 51,195 clean
us-west-virginia 25,081 clean
us-wisconsin 84,094 clean
us-wyoming 14,739 clean
uzbekistan 35,052 clean
vanuatu 663 clean
venezuela 14,723 clean
vietnam 21,025 clean
yemen 7,008 clean
zambia 15,684 clean
zimbabwe 7,545 clean
Total 16,297,690

Back to the dataset root