Skip to content

Instantly share code, notes, and snippets.

@maxerickson
Last active January 21, 2016 03:38
Show Gist options
  • Save maxerickson/a07ed6289ab6ba355560 to your computer and use it in GitHub Desktop.
Save maxerickson/a07ed6289ab6ba355560 to your computer and use it in GitHub Desktop.
County label helpers.
/* Checking US county label linking */
relation[type=boundary][admin_level=6][!wikipedia]{
throwWarning: tr("Missing wikipedia tag on county relation.");
}
relation[type=boundary][admin_level=6][not(JOSM_search("hasRole:label"))]{
throwWarning: tr("County relation missing label.");
}
relation[type=boundary][admin_level=6][not(JOSM_search("hasRole:admin_centre"))]{
throwWarning: tr("County relation missing admin_centre.");
}
relation[type=boundary][admin_level=6] >[role=label] node{
set county_label;
}
node[place=county]!.county_label{
throwWarning: tr("place=county node is not role=label in relation.");
}
node[place!=county].county_label{
throwWarning: tr("Wrong place type as county label.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment