openstreetmap-ng
openstreetmap-ng copied to clipboard
Implicit discardable tags
When processing new changes, we want to automatically discard certain tags so clients don't have too. JOSM and iD already implement such features but we should apply it globally for simplicity.
The goal is to:
- efficiently discard certain tags during tagsvalidating validation function (it should return modified dict of tags), see models/validating/tags
- migrate rules from JOSM and iD
I think if the discard method is simple enough (which is very likely), it should be a part of the validating model file.
More info at OSM Wiki including references to iD/JOSM
Is it enough to modify the tags instance passed as a parameter to the validate_tags method, or do we need to make a copy of all the tags?
It's okay to modify it inplace
I found that the same validation also takes place for changesets, which may include tags such as created_by.
Good catch, let's focus on validating elements only, then. Maybe itβs possible to do this within ElementValidating?