Changeset b701cc3 in osmose-backend


Ignore:
Timestamp:
Jan 4, 2015 8:24:17 PM (5 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
a910761
Parents:
7c20c21
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (04/01/2015 19:09:22)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (04/01/2015 20:24:17)
Message:

Fix aquitaine merge analyser

Location:
analysers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • analysers/analyser_merge_library_FR_aquitaine.py

    r952ae8e rb701cc3  
    2222 
    2323from Analyser_Merge import Analyser_Merge, Source, CSV, Load, Mapping, Select, Generate 
     24import re 
    2425 
    2526 
     
    2728    def __init__(self, config, logger = None): 
    2829        self.missing_official = {"item":"8230", "class": 1, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Library not integrated") } 
    29         self.possible_merge   = {"item":"8231", "class": 3, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Library, integration suggestion") } 
    3030        Analyser_Merge.__init__(self, config, logger, 
    3131            Source( 
     
    3636                csv = CSV(separator = ";")), 
    3737            Load("LONGITUDE", "LATITUDE", table = "library_FR_aquitaine", 
     38                filter = lambda text: re.sub("(;\"[^\"]+)\r\n", '\\1', text), 
    3839                where = lambda row: u"Bibliothèque" in row["NOM_OFFRE"] or u"Médiathèque" in row["NOM_OFFRE"]), 
    3940            Mapping( 
  • analysers/analyser_merge_restaurant_FR_aquitaine.py

    r118cf9c rb701cc3  
    2222 
    2323from Analyser_Merge import Analyser_Merge, Source, CSV, Load, Mapping, Select, Generate 
     24import re 
    2425 
    2526 
     
    2728    def __init__(self, config, logger = None): 
    2829        self.missing_official = {"item":"8240", "class": 1, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Restaurant not integrated") } 
    29         self.possible_merge   = {"item":"8241", "class": 3, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Restaurant, integration suggestion") } 
    3030        Analyser_Merge.__init__(self, config, logger, 
    3131            Source( 
     
    3636                csv = CSV(separator = ";")), 
    3737            Load("LONGITUDE", "LATITUDE", table = "restaurant_FR_aquitaine", 
     38                filter = lambda text: re.sub("(;\"[^\"]+)\r\n", '\\1', text), 
    3839                select = { 
    3940                    'TYPE': [u"Restaurant", u"Hôtel restaurant", u"Ferme auberge"], 
  • analysers/analyser_merge_restaurant_FR_cg71.py

    rff30850 rb701cc3  
    2828    def __init__(self, config, logger = None): 
    2929        self.missing_official = {"item":"8240", "class": 11, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Restaurant not integrated") } 
    30         self.possible_merge   = {"item":"8241", "class": 13, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Restaurant, integration suggestion") } 
    3130 
    3231        latlon = re.compile(",(4[0-9])([0-9]+),([0-9])([0-9]+),") 
  • analysers/analyser_merge_winery_FR_aquitaine.py

    r952ae8e rb701cc3  
    2222 
    2323from Analyser_Merge import Analyser_Merge, Source, CSV, Load, Mapping, Select, Generate 
     24import re 
    2425 
    2526 
    2627class Analyser_Merge_Winery_FR_aquitaine(Analyser_Merge): 
    2728    def __init__(self, config, logger = None): 
    28         self.missing_official = {"item":"8240", "class": 1, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Winery not integrated") } 
    29         self.possible_merge   = {"item":"8241", "class": 3, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Winery, integration suggestion") } 
     29        self.missing_official = {"item":"8250", "class": 1, "level": 3, "tag": ["merge", "amenity"], "desc": T_(u"Winery not integrated") } 
    3030        Analyser_Merge.__init__(self, config, logger, 
    3131            Source( 
     
    3636                csv = CSV(separator = ";")), 
    3737            Load("LONGITUDE", "LATITUDE", table = "winery_FR_aquitaine", 
    38                 where = lambda row: u"roducteur" in row["NOM_OFFRE"] or u"Coopérative" in row["NOM_OFFRE"]), 
     38                filter = lambda text: re.sub("(;\"[^\"]+)\r\n", '\\1', text), 
     39                where = lambda row: u"roducteur" in row["TYPE"] or u"Coopérative" in row["TYPE"]), 
    3940            Mapping( 
    4041                select = Select( 
Note: See TracChangeset for help on using the changeset viewer.