wiki:Rules/ValidatingBuildingsInHOTTMProjects
meta
{
  title: "Validating tasks in HOT TM projects (HOT TM Validator Checker)";
  version: "23_2023-07-23";
  description: "Few rules mostly for flagging objects with layer tag.";
  icon: "HOT_TM_logo.svg";
  author: "Patrik_B";
  link: "http://bit.ly/3zzivTi";
}

/*
  Building with layer tag with exception for building=roof
*/
*[building][building!=roof][layer]{
  throwWarning: tr("_Fix - Building has layer tag");
  fixRemove: "layer";
  group: tr("HOT TM Validator Checker");
}

/*
  Uploaded part of taskgrid
*/
*[taskId][taskStatus]{
throwError: tr("Part of project taskgrid");
group: tr("HOT TM Validator Checker");
}

/*
  Bridge without layer tag
*/
*[bridge][!layer]{
throwWarning: tr("_Fix - _Bridge is missing layer tag");
fixAdd: "layer=1";
group: tr("HOT TM Validator Checker");
}

/*
  Tunnel without layer tag. Added thanks to Filip009 and exception thanks to michael63
*/
*[tunnel][tunnel!=building_passage][!layer]{
throwWarning: tr("_Fix - _Tunnel is missing layer tag");
fixAdd: "layer=-1";
group: tr("HOT TM Validator Checker");
}

/*
  Highway with layer tag with exception for tunnel and bridge. Added thanks to martien-176
*/
*[highway][!bridge][!tunnel][layer]{
throwWarning: tr("_Fix - Highway has layer tag");
fixRemove: "layer";
group: tr("HOT TM Validator Checker");
}

/*
  Waterway with layer tag. Added thanks to martien-176
*/
*[waterway][!bridge][!tunnel][layer]{
throwWarning: tr("_Fix - Waterway has layer tag");
fixRemove: "layer";
group: tr("HOT TM Validator Checker");
}

/*
  Node with building tag
*/
node[building]{
throwWarning: tr("Node has a building tag");
group: tr("HOT TM Validator Checker");
}

/*
  Too short unclassified highway (highway probably having wrong tag). Added thanks to adiatmad (dinar)
*/
way[highway=unclassified][waylength() < 50][!bridge][!tunnel] {
throwWarning: tr("Unclassified highway shorter than 50 meters");
group: tr("HOT TM Validator Checker");
}

/*
  Building with tag that is not listed in the current list of https://wiki.openstreetmap.org/wiki/Key:building 23.07.2023
*/
way[building][building!=apartments][building!=barracks][building!=bungalow][building!=cabin][building!=detached][building!=dormitory][building!=farm][building!=ger][building!=hotel][building!=house][building!=houseboat][building!=residential][building!=semidetached_house][building!=static_caravan][building!=stilt_house][building!=terrace][building!=tree_house][building!=commercial][building!=industrial][building!=kiosk][building!=office][building!=retail][building!=supermarket][building!=warehouse][building!=cathedral][building!=chapel][building!=church][building!=kingdom_hall][building!=monastery][building!=mosque][building!=presbytery][building!=religious][building!=shrine][building!=synagogue][building!=temple][building!=bakehouse][building!=bridge][building!=civic][building!=college][building!=fire_station][building!=government][building!=gatehouse][building!=hospital][building!=kindergarten][building!=public][building!=school][building!=toilets][building!=train_station][building!=transportation][building!=university][building!=barn][building!=conservatory][building!=cowshed][building!=farm_auxiliary][building!=greenhouse][building!=slurry_tank][building!=stable][building!=sty][building!=livestock][building!=grandstand][building!=pavilion][building!=riding_hall][building!=sports_hall][building!=stadium][building!=hangar][building!=hut][building!=shed][building!=carport][building!=garage][building!=garages][building!=parking][building!=digester][building!=service][building!=transformer_tower][building!=water_tower][building!=storage_tank][building!=silo][building!=beach_hut][building!=bunker][building!=castle][building!=construction][building!=container][building!=military][building!=roof][building!=ruins][building!=tent][building!=tower][building!=yes]{
  throwWarning: tr("Building has incorrect tag");
  group: tr("HOT TM Validator Checker");
}

Rules_ValidatingBuildingsInHOTTMProjects.validator.mapcss, Rules_ValidatingBuildingsInHOTTMProjects.zip

Last modified 10 months ago Last modified on 2023-07-23T19:54:16+02:00

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.