Changeset 29cf324 in osmose-backend


Ignore:
Timestamp:
May 22, 2014 10:14:47 AM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
c5b3270
Parents:
248308a
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (20/05/2014 10:04:26)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (22/05/2014 10:14:47)
Message:

Ignore tag postal_code in NL on TagFix_Postcode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/TagFix_Postcode.py

    rf696037 r29cf324  
    7171            self.CountryPostcode = None 
    7272 
     73        self.tags = ["addr:postcode"] 
     74        if self.Country not in ('NL',): 
     75            self.tags.append("postal_code") 
     76 
    7377    def node(self, data, tags): 
    7478        if not self.CountryPostcode or (not 'postal_code' in tags and not 'addr:postcode' in tags): 
     
    7680 
    7781        err = [] 
    78         for tag in ("postal_code", "addr:postcode"): 
     82        for tag in self.tags: 
    7983            if tag in tags and not self.CountryPostcode.match(tags[tag]): 
    8084                err.append((31901, 0, {"en": "Invalid postcode %s for country code %s" % (tags[tag], self.Country), "fr": "Code postal %s invalide pour le code pays %s" % (tags[tag], self.Country)})) 
Note: See TracChangeset for help on using the changeset viewer.