# Gazetteer index and crosswalk

Geometry-free companions to the gazetteer collections, for searching and resolving places in the browser.
Licence of the index itself: CC0-1.0. Each row carries the `license` and `attribution` of the geometry it
points to; honour them when you use that geometry.

## `places_index.parquet`

One row per place (49454 rows, row groups of 5000, snappy, plain columns).

| column | type | note |
|---|---|---|
| place_id | utf8 | `<authority>:<source_id>`, stable |
| name | utf8 | |
| authority | utf8 | |
| place_type | utf8 | |
| geom_type | utf8 | Point, LineString, Polygon, Multi* |
| collection | utf8 | slug; the PMTiles/GeoParquet live at `<base><collection>/` |
| bbox | struct | xmin, ymin, xmax, ymax (double). Convention: a place stored split at the antimeridian has the UNWRAPPED bbox, western parts shifted +360, so **xmax may exceed 180** (e.g. 177..199); fit bounds with it as is, wrap a longitude back with `((x + 540) % 360) - 180`. Other places have the stored bbox |
| centroid_lon, centroid_lat | double | planar centroid of the stored geometry (bbox centre if absent). Same convention as the bbox: for a place stored split at the antimeridian it is the centroid of the UNWRAPPED parts, so `centroid_lon` may exceed 180 (e.g. 188) and lies inside the bbox |
| area_km2 | double | the source's own area, else the geodesic (WGS84) area of a polygon; null for points and lines |
| license, attribution, version, updated | utf8 | per row, from the collection |
| source_id | utf8 | the place's id at its source (MRGID, ps_id, ...); fills a reference layer's `feature_url` |
| url | utf8 | the place's own page at its source (e.g. its Marine Regions gazetteer page, or the managing authority's page for a Navigator site); null when the source has none |
| group_id | utf8 | rows that are the same place in different collections (or listed twice in one) share it: same name after normalising, same geometry kind, bbox IoU >= 0.8 (points within 0.001 deg); `<collection>/<place_id>` of the group's first member; null for a place with no other copy. Every copy keeps its own row, licence and geometry; apps pick which to show (layers.json `search_rank`) |

## `crosswalk.parquet`

`place_id` plus `mrgid`, `psgid`, `wdpa_id`, `mpainv_site_id`, `mpatlas_id`, `wikidata_qid`, `gers_id` (all utf8,
null where unknown); only places with at least one external id have a row (32753 rows).
Sources: `MRGID:`, `PSGID:`, `MPAINV:` and `MPA:` (NOAA MPA Inventory) place_id prefixes; id columns in a source
layer (`mrgid`, `psgid`, `ProSeasID` as psgid, `WDPA_Cd` as wdpa_id). `mpatlas_id`, `wikidata_qid` and `gers_id`
are reserved for later.

| column | non-null |
|---|---|
| mrgid | 1661 |
| psgid | 31086 |
| wdpa_id | 13589 |
| mpainv_site_id | 981 |
| mpatlas_id | 0 |
| wikidata_qid | 0 |
| gers_id | 0 |

## Collections indexed

| collection | origin | places |
|---|---|---|
| boem_marine_minerals_leases | published | 78 |
| boem_ocs_planning | published | 27 |
| boem_ocs_withdrawals | published | 28 |
| boem_pacific_og_leases | published | 30 |
| boem_program_11_draft | published | 20 |
| boem_wind_leases | published | 52 |
| boem_wind_planning_rescinded | published | 3325 |
| calcofi_lines | published | 11 |
| calcofi_stations | published | 113 |
| epa_ocean_disposal_sites | published | 96 |
| fao_high_seas | internal | 18 |
| fao_major_areas | published | 19 |
| fws_critical_habitat_proposed | published | 70 |
| gebco_undersea | published | 5412 |
| mpa_inventory | published | 981 |
| mr_archipelagic_waters | internal | 23 |
| mr_contiguous_zones | internal | 220 |
| mr_ecs | internal | 147 |
| mr_eez | internal | 285 |
| mr_eez_iho | internal | 572 |
| mr_goas | internal | 10 |
| mr_high_seas | internal | 1 |
| mr_internal_waters | internal | 113 |
| mr_territorial_seas | internal | 230 |
| mr_world_heritage_marine | internal | 60 |
| navy_operating_areas | published | 35 |
| navy_special_use_airspace | published | 769 |
| noaa_aoa_socal | published | 10 |
| noaa_cetacean_bia | published | 131 |
| noaa_coral_protection_areas | published | 19 |
| noaa_efh | published | 782 |
| noaa_hapc | published | 237 |
| noaa_lightering_zones | published | 122 |
| noaa_marine_monuments | published | 32 |
| noaa_maritime_limits | published | 246 |
| noaa_narw_sma | published | 10 |
| noaa_nerrs | published | 30 |
| noaa_pilot_boarding_areas | published | 168 |
| noaa_sanctuaries | published | 47 |
| noaa_state_lateral_boundaries | published | 19 |
| noaa_state_submerged_lands | published | 483 |
| noaa_submarine_cables | published | 2816 |
| noaa_vessel_routing_measures | published | 327 |
| places | published | 18 |
| protectedseas_fisheries | published | 6163 |
| protectedseas_human_use | published | 3130 |
| protectedseas_jurisdiction | published | 545 |
| protectedseas_mpa | published | 13061 |
| protectedseas_other | published | 5899 |
| protectedseas_vessel | published | 1313 |
| usace_danger_zones | published | 422 |
| uscg_anchorages | published | 679 |

Rebuild with `python scripts/build_index.py` (local `catalog/staging/*/places.parquet` wins over the published
catalog; `--no-remote` / `--no-local` restrict it).
