Changeset 6a51443 in osmose-backend


Ignore:
Timestamp:
May 15, 2014 9:01:11 PM (6 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
57afd76
Parents:
d516dc1
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (14/05/2014 23:35:52)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (15/05/2014 21:01:11)
Message:

No use of option no_ref_on_junction, use only_for

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • osmose_config.py

    rf678f9e r6a51443  
    199199        if not analyser_options: 
    200200            analyser_options = {} 
    201         analyser_options.update({"country": "FR", "language": "fr", "proj": proj, "no_ref_on_junction": True}) 
     201        analyser_options.update({"country": "FR", "language": "fr", "proj": proj}) 
    202202        default_country.__init__(self, part, country, polygon_id, analyser_options, 
    203203                                        download_repo, download_country) 
  • plugins/TagRemove_Roundabout.py

    rf678f9e r6a51443  
    2828        Plugin.init(self, logger) 
    2929        self.errors[101] = { "item": 4020, "level": 2, "tag": ["highway", "roundabout", "fix:chair"], "desc": T_(u"Unneeded tag on junction=roundabout") } 
    30         self.no_ref_on_junction = self.father.config.options.get("no_ref_on_junction") 
    3130 
    3231    def way(self, data, tags, nds): 
     
    3635        if u"oneway" in tags: 
    3736            err.append((101, 0, {"fr": u"Tag oneway inutile", "en": u"Unecessary tag oneway", "fix": {"-": ["oneway"]}})) 
    38         if self.no_ref_on_junction and u"ref" in tags: 
    39             err.append((101, 1, {"fr": u"Ne doit pas contenir de tag ref=%s" % tags[u"ref"], "en": u"Should not contains tag ref=%s" % tags[u"ref"], "fix": {"-": ["ref"]} })) 
    4037        return err 
    4138 
     
    4744    def test(self): 
    4845        a = TagRemove_Roundabout(None) 
    49         class _config: 
    50             options = {"no_ref_on_junction": True} 
    51         class father: 
    52             config = _config() 
    53         a.father = father() 
    5446        a.init(None) 
    5547        assert not a.way(None, {"junction": "roundabout"}, None) 
    56         self.check_err(a.way(None, {"junction": "roundabout", "ref": "1"}, None)) 
     48        self.check_err(a.way(None, {"junction": "roundabout", "oneway": "true"}, None)) 
Note: See TracChangeset for help on using the changeset viewer.