diff --git a/analysers/analyser_merge_milestone_FR_metropole.py b/analysers/analyser_merge_milestone_FR.py similarity index 87% rename from analysers/analyser_merge_milestone_FR_metropole.py rename to analysers/analyser_merge_milestone_FR.py index 3302fd010..aeed0d38e 100644 --- a/analysers/analyser_merge_milestone_FR_metropole.py +++ b/analysers/analyser_merge_milestone_FR.py @@ -22,10 +22,20 @@ from modules.OsmoseTranslation import T_ from .Analyser_Merge import Analyser_Merge_Point, SourceDataGouv, SHP, LoadGeomCentroid, Conflate, Select, Mapping -class Analyser_Merge_Milestone_FR_metropole(Analyser_Merge_Point): +class Analyser_Merge_Milestone_FR(Analyser_Merge_Point): def __init__(self, config, logger = None): Analyser_Merge_Point.__init__(self, config, logger) + country = self.config.options.get("country") + if country and country.startswith('FR-GP'): + resource = 'e9288a97-faf1-4638-b3df-571ceae401f8' + elif country and country.startswith('FR-PM'): + resource = '9425939b-13f5-460d-a635-fcde0e05ade5' + elif country and country.startswith('FR-YT'): + resource = '65060ce7-acc5-4546-a1ce-b9b47b40383f' + else: + resource = '90a65602-3ca4-41d7-bf7c-23d435c916e1' + doc = dict( detail = T_( '''The list of milestone comes from the CEREMA's database "RIU" in France.'''), @@ -46,7 +56,7 @@ def __init__(self, config, logger = None): SHP(SourceDataGouv( attribution="data.gouv.fr:Ministère de la Transition écologique", dataset="57a837e2c751df5b90bb5dd4", - resource="90a65602-3ca4-41d7-bf7c-23d435c916e1"), + resource=resource), zip='BORNAGE_TOUT.shp'), LoadGeomCentroid( where = lambda row: ( diff --git a/osmose_config.py b/osmose_config.py index fbb2d7ef7..45dab9534 100644 --- a/osmose_config.py +++ b/osmose_config.py @@ -280,7 +280,7 @@ class gen(default_country): 'osmosis_fantoir', 'osmosis_highway_motorway', 'osmosis_highway_zone', - 'merge_milestone_FR_metropole', + 'merge_milestone_FR', 'merge_shop_FR', 'merge_cemetery_FR', 'merge_man_made_FR', @@ -555,9 +555,13 @@ class gen(default_country): ], **{'addr:city-admin_level': '8,9'}) france_departement_dom(["central-america", "guadeloupe"], 1401835, "FR-GP", dep_code=971, proj=32620, phone_code="590") -france_departement_dom(["south-america", "guyane"], 1260551, "FR-GF", dep_code=973, language='fr_GF', proj=2972, phone_code="594") +france_departement_dom(["south-america", "guyane"], 1260551, "FR-GF", dep_code=973, language='fr_GF', proj=2972, phone_code="594", include=[ + 'merge_milestone_FR', +]) france_departement_dom(["central-america", "martinique"], 1891495, "FR-MQ", dep_code=972, proj=32620, phone_code="596") -france_departement_dom(["africa", "mayotte"], 1259885, "FR-YT", dep_code=976, proj=32738, phone_code="262") +france_departement_dom(["africa", "mayotte"], 1259885, "FR-YT", dep_code=976, proj=32738, phone_code="262", include=[ + 'merge_milestone_FR', +]) france_departement_dom(["africa", "reunion"], 1785276, "FR-RE", dep_code=974, proj=2975, phone_code="262") france_com = gen_country(None, country_base='france', download_repo=OSMFR, language='fr', municipality_ref='ref:INSEE', @@ -598,6 +602,7 @@ class gen(default_country): 'merge_reservoir_FR', 'merge_water_FR', 'merge_road_FR', + 'merge_milestone_FR', ]) france_com(["oceania", "wallis_et_futuna"], 290162, "FR-WF", proj=32701, phone_code="681", country="wallisetfutuna") france_com(["oceania", "polynesie"], 3412620, "FR-PF", language='fr_PF', proj=32706, phone_code="689", phone_format=None, phone_len=8, phone_len_short=6, phone_local_prefix=None, phone_international='00')