Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / scripts / maps / wikidesc / src / lib.rs
lib.rs43 lines · 2.0 KiBRaw
| 1 | //! `wikidesc` — a place-description archive, keyed by OSM id. |
| 2 | //! |
| 3 | //! One paragraph of plain text per notable place, so tapping a city, a station or a landmark |
| 4 | //! offline shows what it is rather than only its name. |
| 5 | //! |
| 6 | //! # What counts as notable |
| 7 | //! |
| 8 | //! **Anything carrying an English `wikipedia` tag, whatever it is.** Not a list of kinds. |
| 9 | //! |
| 10 | //! The instinct is to enumerate — admin places, then stations, then parks, then monuments — and it |
| 11 | //! is the wrong shape. The list is never finished, every addition needs a rebuild to take effect, |
| 12 | //! and it answers the wrong question: not "is this a park" but "does anyone consider this worth |
| 13 | //! writing about". OSM already carries that answer. A mapper adds `wikipedia=en:…` when an article |
| 14 | //! exists, so the tag *is* the notability filter, maintained by people who know the place. |
| 15 | //! |
| 16 | //! It sorts the hard cases by itself. Grand Central Terminal has the tag; the bus stop outside |
| 17 | //! does not. Central Park has it; a housing estate's lawn does not. The French Laundry has it and |
| 18 | //! the restaurant next door does not — and that is correct, because the point was never to exclude |
| 19 | //! restaurants, it was to exclude things with nothing to say. |
| 20 | //! |
| 21 | //! It is also the size control. Roughly 1.5 M OSM elements carry a `wikipedia` tag, against some |
| 22 | //! 8 M carrying `wikidata` — the latter is largely bot-added and mostly has no English article |
| 23 | //! behind it. Gating on `wikipedia` picks the set that can actually be filled in. |
| 24 | //! |
| 25 | //! # The key |
| 26 | //! |
| 27 | //! The OSM element id, which `.mamaps` already carries per feature in its v3 feature-id side table |
| 28 | //! and surfaces to the app as `PlacedLabel.featureId`. So this needs no change to the basemap |
| 29 | //! format. |
| 30 | //! |
| 31 | //! See [`clean`] for what a Wikipedia lead is reduced to, and why so aggressively. |
| 32 | |
| 33 | pub mod abstracts; |
| 34 | pub mod archive; |
| 35 | pub mod clean; |
| 36 | pub mod ids; |
| 37 | pub mod join; |
| 38 | |
| 39 | pub use abstracts::{english_title, Abstract, Abstracts}; |
| 40 | pub use archive::{Archive, Builder}; |
| 41 | pub use clean::clean; |
| 42 | pub use ids::tagged_id; |
| 43 | pub use join::{join, Wanted}; |