wiki:Rules/ValidatingBuildingsInHOTTMProjects

Version 26 (modified by Patrik_B, 3 weeks ago) ( diff )

slight rename from "Validating tasks in HOT TM projects (HOT TM Validator Checker)" to "Missing Maps validation on HOT TM (HOT TM Validator Checker)". Changed icon. Updated list of building tagging, added new rules for overlaping landuse, landuse area with place attribute

meta
{
  title: "Missing Maps validation on HOT TM (HOT TM Validator Checker)";
  version: "31_2026-03-21";
  description: "Few rules mostly for flagging objects with layer tag.";
  icon: "https://raw.githubusercontent.com/Patrik-Br/MyPaintStyle/main/Validator_rules/MM_logo.png";
  author: "Patrik_B";
  link: "https://docs.google.com/document/d/1EhOof9iZ5E9yTe64IPqBy8FHSM9hC7j3MyTE9qSzt1Q/edit?usp=sharing";
}

/*
  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 TM project 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 - turned off because more often we map buildings as nodes on purpose then by mistake. I recommend to use NodeBuildings paint style to highlight them

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 created 23.07.2023 - updated 20.03.2026
*/
way[building][building!=apartments][building!=barracks][building!=bungalow][building!=cabin][building!=detached][building!=annexe][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!=trullo][building!=commercial][building!=industrial][building!=kiosk][building!=office][building!=retail][building!=supermarket][building!=warehouse][building!=religious][building!=cathedral][building!=chapel][building!=church][building!=kingdom_hall][building!=monastery][building!=mosque][building!=presbytery][building!=shrine][building!=synagogue][building!=temple][building!=bakehouse][building!=bridge][building!=civic][building!=clock_tower][building!=college][building!=fire_station][building!=government][building!=gatehouse][building!=hospital][building!=kindergarten][building!=museum][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!=sports_centre][building!=stadium][building!=allotment_house][building!=boathouse][building!=hangar][building!=hut][building!=shed][building!=carport][building!=garage][building!=garages][building!=parking][building!=digester][building!=service][building!=tech_cab][building!=transformer_tower][building!=water_tower][building!=storage_tank][building!=silo][building!=beach_hut][building!=bunker][building!=castle][building!=construction][building!=container][building!=guardhouse][building!=military][building!=outbuilding][building!=pagoda][building!=quonset_hut][building!=roof][building!=ruins][building!=ship][building!=tent][building!=tower][building!=triumphal_arch][building!=windmill]{
  throwWarning: tr("Building has incorrect tag");
  group: tr("HOT TM Validator Checker");
}

/* When downloading MapSwipe results (HOT Tasking Manager Geometries) sometimes there are overlapping tasks. The next two rules will flag those. */
/* Overlapping MapSwipe tasks */
area[group_id][group_id!~/no|entrance/]  area[group_id:part][group_id:part!~/no|entrance/],
area[group_id][group_id!~/no|entrance/]  area[group_id][group_id!~/no|entrance/] {
  throwError: tr("MapSwipe overlapping tasks");
    group: tr("HOT TM Validator Checker");
}

/* Task inside another task */
*[group_id][group_id!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] 
area[group_id][group_id!~/no|entrance/] {
  throwError: tr("MapSwipe task inside task");
    group: tr("HOT TM Validator Checker");
}

/* Two rules for overlapping landuse, created during Rutshuru campaign  */
way[landuse]  *[landuse]{
  throwWarning: tr("Landuse inside landuse");
    group: tr("HOT TM Validator Checker");
}

*[landuse]  *[landuse]{
  throwWarning: tr("Overlaping landuse areas");
    group: tr("HOT TM Validator Checker");
}

/* Sometimes mappers tag the residential area with place=* instead of using the tagging on a node/point */
way[landuse=residential][place]{
  throwWarning: tr("place=* attribute on residential area instead of point");
    group: tr("HOT TM Validator Checker");
}

Rules_ValidatingBuildingsInHOTTMProjects.validator.mapcss, Rules_ValidatingBuildingsInHOTTMProjects.zip

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.