Changeset cbe335d in osmose-backend


Ignore:
Timestamp:
Jan 18, 2015 6:40:51 PM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
01f2cadc
Parents:
1a69218
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (18/01/2015 18:40:15)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (18/01/2015 18:40:51)
Message:

Deals with Puerto Rico admin level in analyser_osmosis_boundary_relation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • analysers/analyser_osmosis_boundary_relation.py

    refcddb7 rcbe335d  
    44########################################################################### 
    55##                                                                       ## 
    6 ## Copyrights Frédéric Rodrigo 2013                                      ## 
     6## Copyrights Frédéric Rodrigo 2013-2015                                 ## 
    77##                                                                       ## 
    88## This program is free software: you can redistribute it and/or modify  ## 
     
    4949    relations.tags->'boundary' = 'administrative' AND 
    5050    relations.tags?'admin_level' AND 
    51     relations.tags->'admin_level' = '8' 
     51    relations.tags->'admin_level' = '{2}' 
    5252""" 
    5353 
     
    137137        Analyser_Osmosis.__init__(self, config, logger) 
    138138        self.FR = config.options and "country" in config.options and config.options["country"] == "FR" 
     139        self.PR = config.options and "country" in config.options and config.options["country"] == "PR" 
    139140        self.classs_change[1] = {"item":"7120", "level": 2, "tag": ["boundary", "fix:chair"], "desc": T_(u"Missing admin_centre role") } 
    140141        self.classs_change[2] = {"item":"7120", "level": 1, "tag": ["boundary", "name", "fix:chair"], "desc": T_(u"Missing name") } 
     
    152153 
    153154    def analyser_osmosis_all(self): 
    154         self.run(sql00.format("", "")) 
     155        self.run(sql00.format("", "", "6" if self.PR else "8")) 
    155156        self.run(sql10, self.callback10) 
    156157        self.run(sql20, self.callback20) 
     
    162163 
    163164    def analyser_osmosis_touched(self): 
    164         self.run(sql00.format("touched_", "")) 
     165        self.run(sql00.format("touched_", "", "6" if self.PR else "8")) 
    165166        self.run(sql10, self.callback10) 
    166167        self.run(sql20, self.callback20) 
     
    170171        self.run(sql50, self.callback50) 
    171172 
    172         self.run(sql00.format("", "touched_")) 
     173        self.run(sql00.format("", "touched_", "6" if self.PR else "8")) 
    173174        self.run(sql10, self.callback10) 
    174175        self.run(sql20, self.callback20) 
Note: See TracChangeset for help on using the changeset viewer.