Changeset 96713d7 in osmose-backend


Ignore:
Timestamp:
Jul 6, 2014 10:58:17 PM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
e9eea42
Parents:
10ef8f2
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (06/07/2014 22:57:46)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (06/07/2014 22:58:17)
Message:

Also street sub number in Vietnam in Name_Multiple.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/Name_Multiple.py

    r0634725 r96713d7  
    3131 
    3232        # In Thailand street added into exisint street are named like บ้านแพะแม่คือ ซอย 5/1 
    33         self.thailand = self.father.config.options.get("country") == 'TH' 
    34         self.thailandRe = re.compile(u"^.*[0-9๐๑๒๓๔๕๖๗๘๙]/[0-9๐๑๒๓๔๕๖๗๘๙]+$") 
     33        self.streetSubNumber = self.father.config.options.get("country") in ('TH', 'VN') 
     34        self.streetSubNumberRe = re.compile(u"^.*[0-9๐๑๒๓๔๕๖๗๘๙]/[0-9๐๑๒๓๔๕๖๗๘๙]+$") 
    3535 
    3636    def way(self, data, tags, nds): 
     
    4242        if ';' in tags["name"]: 
    4343            return [(705,0,{"en": "name=%s" % tags["name"]})] 
    44         if '/' in tags["name"] and not (self.thailand and self.thailandRe.match(tags["name"])): 
     44        if '/' in tags["name"] and not (self.streetSubNumber and self.streetSubNumberRe.match(tags["name"])): 
    4545            return [(705,1,{"en": "name=%s" % tags["name"]})] 
    4646        if '+' in tags["name"][0:-1]: 
Note: See TracChangeset for help on using the changeset viewer.