MapRules: Custom Tagging Presets and Validation Rules for OpenStreetMap
At the 2018 State of the Map US conference we presented MapRules — software that generates custom OpenStreetMap tagging presets and validation rules. Mapping projects currently rely on links to wikis and instructions to inform volunteers on how features should be mapped. This leaves mappers to their own interpretation of projects’ tagging directions, and places the burden on validators to ensure consistency and quality of mappers contributions.
MapRules reduces the time-intensive work for both mappers and validators by creating custom presets to link the instructions that campaign managers write with the editing tools used by mappers. These custom presets and validation rules make sure mappers map only what is necessary for a given project and give validators a mechanism to rapidly review mappers’ work. These features remove pain points for everyone involved in the execution of a mapping project and lower the barrier to entry for new participants.
Meeting exact project requirements
The Humanitarian OpenStreetMap Team’s Tasking Manager includes a number of projects intended to map road networks and communities in parts of Africa vulnerable to future Ebola outbreaks. These projects are perfect real-world examples of how MapRules can be beneficial to the OpenStreetMap community.
The tagging instructions for each project detail both tags to apply to features and provide external tagging references, like the Africa Highway Tags guide. The language used to instruct mappers is not always uniform and does not always conform with tagging guides or conform with the default presets in editors like iD and JOSM. For example, the Africa highway tagging guide suggests a “smoothness” tag is useful to include on an unclassified road as a means to help describe how passable a road might be. However, the tagging preset presented in iD does not provide smoothness as a default field, and it is not mentioned in the project instructions either.
Moreover, some of the preset fields editors present — particularly the surface tag — do not include all possible values presented in the Africa Highway Tags. We’ve found these inconsistencies to be problematic, leading to incomplete feature tagging as well as tagging that is not up to standard with the OpenStreetMap community’s tagging conventions.
Using MapRules, campaign managers can ensure each preset is built to their exact specification. In this example, managers can use the MapRules user interface to enforce that unclassified roads need to have a “smoothness” tag and — if discernible — a “surface” tag. A campaign manager would first designate the feature’s identifying tag (“highway=unclassified”) then instruct that the feature must have a “smoothness” tag that must have the value “good”, “intermediate”or “bad”. Additionally the manager could instruct that a feature may also have a “surface” tag that, if present, must have a value “asphalt”, “concrete” or “ground.”
With these presets built for a project, a mapper would select a project task and launch the iD editor to begin mapping. Upon selecting the unclassified road preset, the mapper would only be presented with the fields listed in the MapRules instructions that the campaign manager built. This eliminates the mismatch between instructions and default presets. Campaign managers write mapping instructions and MapRules generates presets that enforce the exact tags they want to see on features.
The validation rules MapRules generates are usable in both JOSM and iD editor. These rules are a big win for campaign managers and mappers alike. Campaign managers do not have to spend time mastering the MapCSS spec in order to make sure mapped features are properly tagged, and mappers receive feedback immediately while mapping since tag validation occurs in editors “on save.”
Open For Suggestions and Help!
MapRules development is far from over. Meeting with members of the OpenStreetMap community at State of the Map led to ideas that we are excited to make part of MapRules. We look forward to more feedback and welcome contributions to our repository on GitHub.
Catch up on all the talks from State of the Map US 2018 on YouTube, including MapRules and Validation of the Users, By the Users, For the Users.
We are always on the lookout for talented developers, engineers and analysts. If you are interested in a new career opportunity, we are currently looking for Software Development Engineers, Senior Software Engineers, Systems Engineers and DevOps Engineers.