def __init__(self, config, logger=None): self.missing_official = { "item": "8130", "class": 21, "level": 3, "tag": ["merge", "parking"], "desc": T_(u"BM parking disabled not integrated") } Analyser_Merge.__init__( self, config, logger, "http://data.bordeaux-metropole.fr/data.php?themes=8", u"Place de stationnement PMR", SHP( Source( attribution=u"Bordeaux Métropole", millesime="08/2016", fileUrl= "http://data.bordeaux-metropole.fr/files.php?gid=73&format=2", zip="GRS_GIGC_P.shp", encoding="ISO-8859-15")), Load(("ST_X(geom)", ), ("ST_Y(geom)", ), srid=2154), Mapping(select=Select(types=["nodes", "ways"], tags={ "amenity": "parking", "capacity:disabled": None }), conflationDistance=100, generate=Generate(static1={ "amenity": "parking", "capacity:disabled": "yes" }, static2={"source": self.source})))
def __init__(self, config, logger = None): self.missing_official = {"item":"8120", "class": 21, "level": 3, "tag": ["merge", "recycling"], "desc": T_(u"NM glass recycling not integrated") } self.possible_merge = {"item":"8121", "class": 23, "level": 3, "tag": ["merge", "recycling"], "desc": T_(u"NM glass recycling, integration suggestion") } self.update_official = {"item":"8122", "class": 24, "level": 3, "tag": ["merge", "recycling"], "desc": T_(u"NM glass recycling update") } Analyser_Merge.__init__(self, config, logger, "http://data.nantes.fr/donnees/detail/localisation-des-colonnes-aeriennes-de-nantes-metropole/", u"Localisation des colonnes aériennes de Nantes Métropole", SHP(Source(attribution = u"Nantes Métropole", millesime = "07/2016", fileUrl = "http://data.nantes.fr/fileadmin/data/datastore/nm/environnement/24440040400129_NM_NM_00119/COLONNES_AERIENNES_NM_shp_l93.zip", zip = "COLONNES_AERIENNES_NM.shp", encoding = "ISO-8859-15")), Load(("ST_X(geom)",), ("ST_Y(geom)",), srid = 2154, select = {"TYPE_DECHE": "verre"}), Mapping( select = Select( types = ["nodes", "ways"], tags = {"amenity": "recycling"}), osmRef = "ref:FR:NM", conflationDistance = 100, generate = Generate( static1 = { "amenity": "recycling", "recycling:glass_bottles": "yes", "recycling_type": "container"}, static2 = {"source": self.source}, mapping1 = {"ref:FR:NM": "ID_COLONNE"}, text = lambda tags, fields: {"en": ', '.join(filter(lambda x: x != "None", [fields["TYPE_DECHE"], fields["VOIE"], fields["OBS"]]))} )))
def __init__(self, config, logger=None): self.missing_official = { "item": "8160", "class": 1, "level": 3, "tag": ["merge", "public equipment", "cycle"], "desc": T_(u"BM bicycle rental not integrated") } self.possible_merge = { "item": "8161", "class": 3, "level": 3, "tag": ["merge", "public equipment", "cycle"], "desc": T_(u"BM bicycle rental integration suggestion") } self.update_official = { "item": "8162", "class": 4, "level": 3, "tag": ["merge", "public equipment", "cycle"], "desc": T_(u"BM bicycle update") } Analyser_Merge.__init__( self, config, logger, "http://data.bordeaux-metropole.fr/data.php?themes=10", u"Station VCUB", SHP( Source( attribution=u"Bordeaux Métropole", millesime="08/2016", fileUrl= "http://data.bordeaux-metropole.fr/files.php?gid=43&format=2", zip="TB_STVEL_P.shp", encoding="ISO-8859-15")), Load(("ST_X(geom)", ), ("ST_Y(geom)", ), srid=2154), Mapping(select=Select(types=["nodes"], tags={"amenity": "bicycle_rental"}), osmRef="ref", conflationDistance=100, generate=Generate( static1={ "amenity": "bicycle_rental", "network": "VCUB" }, static2={"source": self.source}, mapping1={ "name": "NOM", "ref": "NUMSTAT", "capacity": "NBSUPPOR", "vending": lambda res: "subscription" if res["TERMBANC"] == "OUI" else None, "description": lambda res: "VCUB+" if res["TARIF"] == "VLS PLUS" else None })))
def __init__(self, config, logger=None): self.missing_official = { "item": "8040", "class": 51, "level": 3, "tag": ["merge", "public transport"], "desc": T_(u"TBM stop not integrated") } self.possible_merge = { "item": "8041", "class": 53, "level": 3, "tag": ["merge", "public transport"], "desc": T_(u"TBM stop, integration suggestion") } Analyser_Merge.__init__( self, config, logger, "http://data.bordeaux-metropole.fr/data.php?themes=10", u"Arrêt physique sur le réseau", SHP( Source( attribution=u"Bordeaux Métropole", millesime="07/2016", fileUrl= "http://data.bordeaux-metropole.fr/files.php?gid=39&format=2", zip="TB_ARRET_P.shp", encoding="ISO-8859-15")), Load(("ST_X(geom)", ), ("ST_Y(geom)", ), srid=2154, select={"RESEAU": [None, "BUS"]}), Mapping(select=Select(types=["nodes", "ways"], tags={"highway": "bus_stop"}), conflationDistance=100, generate=Generate( static1={ "highway": "bus_stop", "public_transport": "stop_position", "bus": "yes", "network": "TBM" }, static2={"source": self.source}, mapping2={ "name": lambda res: res['NOMARRET'], "shelter": lambda res: "yes" if res["MOBILIE1"] and "abribus" in res["MOBILIE1"].lower() else "no" if res["MOBILIE1"] and "poteau" in res[ "MOBILIE1"].lower() else None }, text=lambda tags, fields: { "en": u"TBM stop %s" % fields["NOMARRET"], "fr": u"Arrêt TBM %s" % fields["NOMARRET"] })))
def __init__(self, config, logger=None): self.missing_official = { "item": "8120", "class": 1, "level": 3, "tag": ["merge", "recycling"], "desc": T_(u"BM glass recycling not integrated") } self.possible_merge = { "item": "8121", "class": 3, "level": 3, "tag": ["merge", "recycling"], "desc": T_(u"BM glass recycling, integration suggestion") } self.update_official = { "item": "8122", "class": 4, "level": 3, "tag": ["merge", "recycling"], "desc": T_(u"BM glass recycling update") } Analyser_Merge.__init__( self, config, logger, "http://data.bordeaux-metropole.fr/data.php?themes=5", u"Emplacements d'apport volontaire", SHP( Source( attribution=u"Bordeaux Métropole", millesime="08/2016", fileUrl= "http://data.bordeaux-metropole.fr/files.php?gid=69&format=2", zip="EN_EMPAC_P.shp", encoding="ISO-8859-15")), Load(("ST_X(geom)", ), ("ST_Y(geom)", ), srid=2154, select={"IDENT": "%"}), Mapping(select=Select(types=["nodes", "ways"], tags={"amenity": "recycling"}), osmRef="ref:FR:CUB", conflationDistance=100, generate=Generate(static1={ "amenity": "recycling", "recycling:glass": "yes", "recycling:glass_bottles": "yes", "recycling_type": "container" }, static2={"source": self.source}, mapping1={"ref:FR:CUB": "IDENT"})))
def __init__(self, config, logger=None): _Analyser_Merge_Street_Number.__init__( self, config, 3, "Bordeaux", logger, "http://data.bordeaux-metropole.fr/data.php?themes=8", u"Numéro de voirie de Bordeaux Métropole", SHP( Source( attribution=u"Bordeaux Métropole", millesime="08/2016", fileUrl= "http://data.bordeaux-metropole.fr/files.php?gid=20&format=2", zip="FV_NUMVO_P.shp", encoding="ISO-8859-15")), Load(("ST_X(geom)", ), ("ST_Y(geom)", ), srid=2154), Mapping(generate=Generate( static2={"source": self.source}, mapping1={"addr:housenumber": "NUMERO"}, text=lambda tags, fields: {"en": fields["NUMERO"]})))
def __init__(self, config, logger=None): _Analyser_Merge_Street_Number.__init__( self, config, 4, "Lyon", logger, "http://smartdata.grandlyon.com/localisation/point-dadressage-sur-bftiment-voies-et-adresses/", u"Grand Lyon - Point d'adressage sur bâtiment (Voies et adresses)", SHP( Source( attribution=u"Grand Lyon", millesime="06/2016", fileUrl= "http://data.grandlyon.com/smartdata/wp-content/plugins/wp-smartdata/proxy.php?format=Shape-zip&name=adr_voie_lieu.adradresse&projection=urn:ogc:def:crs:EPSG::4326&commune=&href=https%3A%2F%2Fdownload.data.grandlyon.com%2Fwfs%2Fgrandlyon%3FSERVICE%3DWFS%26VERSION%3D2.0.0%26outputformat%3DSHAPEZIP%26request%3DGetFeature%26SRSNAME%3DEPSG%3A3946%26typename%3Dadr_voie_lieu.adradresse", zip="adr_voie_lieu.adradresse.shp", encoding="ISO-8859-15")), Load(("ST_X(geom)", ), ("ST_Y(geom)", )), Mapping(generate=Generate( static2={"source": self.source}, mapping1={"addr:housenumber": "numero"}, text=lambda tags, fields: {"en": u"%s %s" % (fields["numero"], fields["voie"])})))
def __init__(self, config, logger=None): _Analyser_Merge_Street_Number.__init__( self, config, 6, "Arles", logger, "http://opendata.regionpaca.fr/donnees/detail/base-de-donnees-adresses-postales-de-laccm.html", u"Base de données Adresses postales de l'ACCM", SHP( Source( attribution=u"Arles Crau Camargue Montagnette", millesime="02/2013", fileUrl= "http://opendata.regionpaca.fr/donnees.html?type=109&no_cache=1&tx_ausyopendata_pi1%5Bdataset%5D=283&tx_ausyopendata_pi1%5Bdatafile%5D=278&tx_ausyopendata_pi1%5Baction%5D=download&tx_ausyopendata_pi1%5Bcontroller%5D=Dataset&cHash=5d538731e8fa4c9f44d1a103dc452ab1", zip="ADRESSE_ACCM.shp")), Load(("ST_X(geom)", ), ("ST_Y(geom)", ), srid=2154), Mapping(generate=Generate( static2={"source": self.source}, mapping1={ "addr:housenumber": lambda res: str(res["num_voi"]) + (res["suf_voi"] if res["suf_voi"] else "") }, text=lambda tags, fields: {"en": fields["adresse"]})))