Changeset e315e4e in osmose-backend


Ignore:
Timestamp:
May 30, 2013 8:03:22 PM (6 years ago)
Author:
Frédéric Rodrigo <frodrigo@…>
Branches:
master
Children:
9dad314
Parents:
13a1868
Message:

Some check are not for nodes into TagFix_MultipleTag_FR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/TagFix_MultipleTag_FR.py

    r20c2f16 re315e4e  
    5858                    break 
    5959 
     60        return err 
     61 
     62    def way(self, data, tags, nds): 
     63        err = self.node(data, tags) 
     64 
    6065        if "name" in tags and tags["name"].startswith("Chemin Rural dit "): 
    6166            err.append((50201, 0, {"fix": {"~": {"name": tags["name"].replace("Chemin Rural dit ", "Chemin ")}}})) 
     
    7782        return err 
    7883 
    79     def way(self, data, tags, nds): 
    80         return self.node(data, tags) 
    81  
    8284    def relation(self, data, tags, members): 
    83         return self.node(data, tags) 
     85        return self.way(data, tags, None) 
    8486 
    8587if __name__ == "__main__": 
    8688    a = TagFix_MultipleTag_FR(None) 
    8789    a.init(None) 
    88     if not a.node(None, {"amenity":"school", "name":"École maternelle Clos Montesquieu"}): 
     90    if not a.way(None, {"amenity":"school", "name":"École maternelle Clos Montesquieu"}, None): 
    8991        print "nofail 1" 
    90     if not a.node(None, {"name":"Chemin Rural dit de la Borne Trouée"}): 
     92    if not a.way(None, {"name":"Chemin Rural dit de la Borne Trouée"}, None): 
    9193        print "nofail 2" 
    92     if not a.node(None, {"highway":"e", "ref": "3"}): 
     94    if not a.way(None, {"highway":"e", "ref": "3"}, None): 
    9395        print "nofail 3" 
    94     if a.node(None, {"highway":"e", "ref": u"D\u20073"}): 
     96    if a.way(None, {"highway":"e", "ref": u"D\u20073"}, None): 
    9597        print "fail 4" 
Note: See TracChangeset for help on using the changeset viewer.