Changeset dc5d737 in osmose-backend


Ignore:
Timestamp:
Jan 25, 2015 9:01:14 PM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
3700478
Parents:
b269627
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (18/01/2015 21:07:19)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (25/01/2015 21:01:14)
Message:

Allow disused and abandonned as parent tags in TagFix_MultipleTag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/TagFix_MultipleTag.py

    r51d281f rdc5d737  
    3838        self.driving_side_right = not(self.father.config.options.get("driving_side") == "left") 
    3939        self.driving_direction = "anticlockwise" if self.driving_side_right else "clockwise" 
    40         self.name_parent = set(('type', 'aerialway', 'aeroway', 'amenity', 'barrier', 'boundary', 'building', 'craft', 'entrance', 'emergency', 'geological', 'highway', 'historic', 'landuse', 'leisure', 'man_made', 'military', 'natural', 'office', 'place', 'power', 'public_transport', 'railway', 'route', 'shop', 'sport', 'tourism', 'waterway', 'mountain_pass', 'traffic_sign', 'mountain_pass', 'golf', 'piste:type', 'junction', 'health_facility:type')) 
     40        name_parent = [] 
     41        for i in ('type', 'aerialway', 'aeroway', 'amenity', 'barrier', 'boundary', 'building', 'craft', 'entrance', 'emergency', 'geological', 'highway', 'historic', 'landuse', 'leisure', 'man_made', 'military', 'natural', 'office', 'place', 'power', 'public_transport', 'railway', 'route', 'shop', 'sport', 'tourism', 'waterway', 'mountain_pass', 'traffic_sign', 'mountain_pass', 'golf', 'piste:type', 'junction', 'health_facility:type'): 
     42            name_parent.append(i) 
     43            name_parent.append("disused:" + i) 
     44            name_parent.append("abandonned:" + i) 
     45        self.name_parent = set(name_parent) 
    4146 
    4247    def common(self, tags, key_set): 
     
    133138 
    134139        assert a.node(None, {"name": "foo"}) 
    135         assert a.way(None, {"name": "foo"}, None) 
    136         assert a.relation(None, {"name": "foo"}, None) 
     140        assert not  a.node(None, {"name": "foo", "disused:highway": "bar"}) 
Note: See TracChangeset for help on using the changeset viewer.