User:TyFi/sandbox

From OpenStreetMap Wiki
Jump to navigation Jump to search
This is a user page for the user TyFi.
This is not a production-quality article or the talk page for such an article. It does not necessarily reflect consensus even if it looks authoritative. I like to test things out such as page layouts and template thingamabobs, but I often abandon these tests at one point or another, so stuff on this page could be way out of date. Nevertheless, if you see a mistake or have comments, concerns, or criticism, please feel free to strike up a discussion on a talk page.

Relation

General Structure of Missouri State Route Relations
Key Value Description
type route ! Required.
route road ! Required.
is_in:state MO (most common)
MO;IL
MO;KY
MO;TN
MO;AR
MO;OK
MO;KS
MO;NE
MO;IA
 Important.

The route exists geographically within the state of Missouri or a bordering state. You may need to reference multiple open data sources for routes that hit the state line.

is_in:county *  Important.

The route exists geographically within the listed counties of Missouri or a bordering state. If the route exists solely within a single county, as is common for supplemental routes, then only that county's name should be provided; however, if the route spans multiple counties, as is common for numbered routes, then list each county separated by semicolons. Remember that the name is the name only, so do not include the word "county". As we live in a world of exceptions, however, the independent city of St. Louis should be included as Saint Louis City to avoid confusion with Saint Louis County and to make it possible for data consumers to exclude St. Louis if they choose. There are no independent cities in bordering states to worry about.

ref * ! Required.

This is the minimum alphanumeric designation of the route. Do not include a MO prefix like you would for ref=* on member ways.

modifier Alternate
Business
Spur
If this is a special route such as a loop or a spur, then this tag is ! required in order to provide that detail. If this is not a special route, then this tag is  not used. The first letter is always capitalized.
network US:MO
US:MO:Alternate
US:MO:Business
US:MO:Spur
US:MO:Supplemental
US:MO:Supplemental:Spur
! Required.

This relation models a Missouri state route, a vehicular route carried on state-maintained roads. Supplemental routes are tagged with network=US:MO:Supplemental or US:MO:Supplemental:-prefixed values, and non-supplemental routes are tagged with network=US:MO or tagged with US:MO:-prefixed values. This tag has a complicated history, however, so for compatibility the modifier value, if present, is repeated here after a final colon.

For example, if ref=240 and modifier=Alternate then network=US:MO:Alternate must be tagged, and if ref=N and modifier=Spur then network=US:MO:Supplemental:Spur must also be tagged.

symbol * ? Optional.

This is a URL to the route's symbol on the web. In practice this is used to link to route shield SVG files hosted on Wikimedia Commons.

name * ? Optional.

In theory this would be the name of the route if, and only if, the route has a distinctive non-systematic name. In practice (as of June 2023) this tag is used to identify and disambiguate the relation among other relations inside editors like iD and JOSM.

to * ? Optional.

To where is the route destined? In practice this is used to identify and disambiguate the relation among other relations inside editors like iD.

from * ? Optional.

From where does the route originate? In practice this is used to identify and disambiguate the relation among other relations inside editors like iD.

wikidata * This is the ID of the corresponding Wikidata item. This tag is  important for non-supplemental routes. As of 2023 the only supplemental route notable enough to use it is Route M in Jefferson County.
wikipedia * This is the title of the corresponding Wikipedia article. This tag is generally ? optional for non-supplemental routes. As with the wikidata tag, the only supplemental route notable enough to use it as of 2023 is Route M in Jefferson County. Please refer to the English Wikipedia, and prepend the tag value with en: to indicate this.
unsigned * ? Optional.

If unsigned=*, then the route is not signed. This is a hint for mappers that on-the-ground verifiability does not apply to this route.

Quality Assurance

The following Overpass Turbo queries can be used to find relations that might break some rules or deviate from consensus. Always verify the results before editing the database.

Relations with bad structure

All state route relations must have type=route, route=road, and ref tags.

try it yourself in overpass-turbo
relation[network~"^US:MO.*"]->.r;
(
  relation.r[!type];
  relation.r[type][type!=route];
  relation.r[!route];
  relation.r[route][route!=road];
  relation.r[!ref];
);
out;

Relations with malformed Wikidata tags

Wikidata item IDs are comprised of the capital letter Q followed by at least one digit.

try it yourself in overpass-turbo
relation[route=road][network~"^US:MO.*"][wikidata][wikidata!~"^Q[0-9]+$"];
out;

Relations with unexpected Wikipedia tags

For state routes in Missouri, we should reference the English Wikipedia and consequently use the en: prefix in the wikipedia tag.

try it yourself in overpass-turbo
relation[route=road][network~"^US:MO.*"][wikipedia][wikipedia!~"^en:.*"];
out;

Numbered routes without Wikidata or Wikipedia tags

This finds numbered routes that are lacking either wikidata or wikipedia tags. Generally, each of these routes is eligible for an English Wikipedia article, and there should be a corresponding Wikidata item for each article, so these should be linked. Special routes such as loops and spurs are typically described on the article for the main route and may not have their own Wikidata items, so use your best judgement when tagging those.

try it yourself in overpass-turbo
relation[route=road][network="US:MO"]->.r;
(
  relation.r[!wikidata];
  relation.r[!wikipedia];
);
out;

Routes without SVG shields from Wikimedia Commons

This finds all state route relations either lacking symbol tags or with symbol tags not pointing to an SVG route shield image hosted on Wikimedia Commons. Use your best judgement when editing based on this query.

try it yourself in overpass-turbo
relation[route=road][network~"^US:MO.*"][symbol!~"^https?://upload\\.wikimedia\\.org\\/[a-zA-Z0-9/-]+/MO-[a-zA-Z0-9-]+\\.svg$"];
out;

Routes with abbreviated county names

As of 2023 the state of Missouri has no county (or independent city) whose fully expanded name contains a period. Therefore, any value of is_in:county that contains a period is either a typo or (more likely) an improper abbreviation of Saint. This query finds periods in is_in:county on state route relations.

try it yourself in overpass-turbo
relation[route=road][network~"^US:MO.*"]["is_in:county"~"\\."];
out;

Routes with county strings containing "county"

As of 2023 there is no county in Missouri whose name-is-the-name-only name contains the string county, so this query can be used to check is_in:county for improper names.

try it yourself in overpass-turbo
relation[route=road][network~"^US:MO.*"]["is_in:county"~"county",i];
out;

Networks

National Highway System

TODO

STRAHNET

TODO

Miscellaneous Notes and TODOs for Article

Bridges reference numbers from MSDIS

Every bridge on a state-designated route afaict has a reference number available as open data from MSDIS.

"MoDOT Maintenance Begins"

Most routes terminate at intersections, but sometimes a route will terminate in the middle of a stretch of road. Look for clues such as a change in pavement color (where the state and county/municipality independently paved different ends of the road), or more reliably MoDOT will sometimes post signs stating "MoDOT Maintenance Begins" or "MoDOT Maintenance Ends". This should be trusted over MSDIS open data which is otherwise good at determining route alignments terminated at intersections but is so-so at determining these free-standing termini. If Bing StreetSide imagery is not available nearby, then you can reference MoDOT's online sign inventory to look for these maintenance signs which seems to have a higher positional accuracy than their route alignment data.