source: osmose-backend/osmose_config.py

Last change on this file was be2fe4a, checked in by Frédéric Rodrigo <fred.rodrigo@…>, 5 years ago

Add merge_geodesie_support_FR

  • Property mode set to 100644
File size: 47.8 KB
Line 
1#-*- coding: utf-8 -*-
2
3###########################################################################
4##                                                                       ##
5## Copyrights Etienne Chové <chove@crans.org> 2009                       ##
6##                                                                       ##
7## This program is free software: you can redistribute it and/or modify  ##
8## it under the terms of the GNU General Public License as published by  ##
9## the Free Software Foundation, either version 3 of the License, or     ##
10## (at your option) any later version.                                   ##
11##                                                                       ##
12## This program is distributed in the hope that it will be useful,       ##
13## but WITHOUT ANY WARRANTY; without even the implied warranty of        ##
14## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         ##
15## GNU General Public License for more details.                          ##
16##                                                                       ##
17## You should have received a copy of the GNU General Public License     ##
18## along with this program.  If not, see <http://www.gnu.org/licenses/>. ##
19##                                                                       ##
20###########################################################################
21
22# langue : http://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1
23# PAYS   : http://fr.wikipedia.org/wiki/ISO_3166-1
24
25import os
26import re
27try:
28     from collections import OrderedDict
29except ImportError:
30     from modules.OrderedDict import OrderedDict
31import modules.config as config
32
33hostname = open("/etc/hostname").read().strip()
34available_results_urls = {"osm1": "http://osm1.crans.org/osmose/",
35                          "osm3": "http://osm3.crans.org/osmose/",
36                          "osm4": "http://osm4.crans.org/osmose/",
37                          "osm5": "http://osm5.univ-nantes.fr/osmose/",
38                          "osm6": "http://osm6.univ-nantes.fr/osmose/",
39                          "osm7": "http://osm7.pole-aquinetic.fr/osmose/",
40                          "osm8": "http://osm8.pole-aquinetic.fr/~osmose/results",
41                          "osmoseit": "http://194.116.72.25/osmose/",
42                          "ubuntu12": "http://46.249.37.15/osmose/",
43                         }
44if hostname in available_results_urls:
45    results_url = available_results_urls[hostname]
46elif re.match("osm[0-9]+$", hostname):
47    results_url = "http://%s.openstreetmap.fr/osmose/" % hostname
48else:
49    results_url = None
50
51###########################################################################
52
53GEOFABRIK = "http://download.geofabrik.de/"
54OSMFR = "http://download.openstreetmap.fr/extracts/"
55FMACH = "http://geodati.fmach.it/"
56
57class template_config:
58
59    clean_at_end   = True
60
61    updt_url       = config.url_frontend_update
62    results_url    = results_url
63    dir_work       = config.dir_work
64    dir_tmp        = config.dir_tmp
65    dir_cache      = config.dir_cache
66    dir_scripts    = config.dir_osmose
67    osmosis_bin    = dir_scripts + "/osmosis/osmosis-0.41/bin/osmosis"
68    osmosis_pre_scripts = [
69        dir_scripts + "/osmosis/osmosis-0.41/script/pgsnapshot_schema_0.6.sql",
70#       dir_scripts + "/osmosis/osmosis-0.41/script/pgsnapshot_schema_0.6_bbox.sql",
71        dir_scripts + "/osmosis/osmosis-0.41/script/pgsnapshot_schema_0.6_linestring.sql",
72    ]
73    osmosis_post_scripts = [
74        dir_scripts + "/osmosis/WaysCreatePolygon.sql",
75        dir_scripts + "/osmosis/CreateFunctions.sql",
76    ]
77    osmosis_change_init_post_scripts = [  # Scripts to run on database initialisation
78        dir_scripts + "/osmosis/osmosis-0.41/script/pgsnapshot_schema_0.6_action.sql",
79        dir_scripts + "/osmosis/WaysCreateTriggerPolygon.sql",
80    ]
81    osmosis_change_post_scripts = [  # Scripts to run each time the database is updated
82        dir_scripts + "/osmosis/CreateTouched.sql",
83    ]
84    dir_results    = config.dir_results
85    dir_extracts   = config.dir_extracts
86    dir_diffs      = config.dir_diffs
87
88    db_base     = "osmose"
89    db_user     = "osmose"
90    db_password = "-osmose-"
91    db_host     = None        # Use socket by default
92    db_schema   = None
93
94    def __init__(self, country, polygon_id=None, analyser_options=None, download_repo=GEOFABRIK):
95        config[country] = self
96        self.country          = country
97        self.polygon_id       = polygon_id # ID of a relation for the country boundary
98        self.download         = {}
99        self.download_repo    = download_repo
100        self.analyser         = OrderedDict()
101        if analyser_options:
102            self.analyser_options = analyser_options
103        else:
104            self.analyser_options = None
105
106        self.sql_post_scripts = []  # Scripts to run everytime, just before launching analysers
107
108    def init(self):
109        if self.db_base:
110            self.db_string = ""
111            if self.db_host:
112                self.db_string += "host=%s " % self.db_host
113            self.db_string += "dbname=%s " % self.db_base
114            self.db_string += "user=%s " % self.db_user
115            self.db_string += "password=%s "  % self.db_password
116
117            self.db_psql_args = []
118            if self.db_host:
119                self.db_psql_args += ["-h", self.db_host]
120            self.db_psql_args += ["-d", self.db_base]
121            self.db_psql_args += ["-U", self.db_user]
122
123            if self.db_schema is None:
124                self.db_schema = "%s,\"$user\"" % self.country
125        else:
126            self.db_string = None
127
128        if "diff" in self.download:
129            self.download["diff_path"] = os.path.join(self.dir_diffs, self.country)
130
131        if "url" in self.download and not "dst" in self.download:
132            ext = os.path.splitext(self.download["url"])[1]
133            for e in [".osm.pbf", ".osm.bz2", ".osm.gz"]:
134                if self.download["url"].endswith(e):
135                    ext = e
136                    break
137
138            self.download["dst"] = self.dir_extracts + "/" + self.country + ext
139
140config = OrderedDict()
141
142###########################################################################
143
144world = template_config("world")
145world.analyser["osmbin_open_relations"] = "xxx"
146
147###########################################################################
148
149france = template_config("france", 1403916, {"country": "FR", "language": "fr"})
150france.download = {
151    "url": france.download_repo+"europe/france-latest.osm.gz",
152    "osmosis": "france"
153}
154france.analyser["communes_manquantes"] = "xxx"
155
156###########################################################################
157
158class default_country_simple(template_config):
159    def __init__(self, part, country, polygon_id=None, analyser_options=None,
160                 download_repo=GEOFABRIK, download_country=None):
161
162        if not download_country:
163            download_country = country
164        country = country.replace("-", "_").replace("/", "_")
165        template_config.__init__(self, country, polygon_id, analyser_options, download_repo)
166        self.download = {
167            "url": self.download_repo + part + "/" + download_country + "-latest.osm.pbf",
168            "poly": self.download_repo + part + "/" + download_country + ".poly",
169            "osmosis": country
170        }
171        if download_repo == GEOFABRIK:
172            self.download["diff"] = self.download_repo + part + "/" + download_country + "-updates/"
173        if download_repo == OSMFR:
174            self.download["poly"] = self.download["poly"].replace("/extracts/", "/polygons/")
175            self.download["diff"] = self.download_repo + "../replication/" + part + "/" + download_country + "/minute/"
176        self.analyser["sax"] = "xxx"
177        self.analyser["osmosis_roundabout_reverse"] = "xxx"
178        self.analyser["osmosis_roundabout_level"] = "xxx"
179        self.analyser["osmosis_soundex"] = "xxx"
180        self.analyser["osmosis_roundabout"] = "xxx"
181        self.analyser["osmosis_boundary_hole"] = "xxx"
182        self.analyser["osmosis_building_overlaps"] = "xxx"
183        self.analyser["osmosis_polygon"] = "xxx"
184        self.analyser["osmosis_highway_vs_building"] = "xxx"
185        self.analyser["osmosis_orphan_nodes_cluster"] = "xxx"
186        self.analyser["osmosis_powerline"] = "xxx"
187        self.analyser["osmosis_double_tagging"] = "xxx"
188        self.analyser["osmosis_relation_associatedStreet"] = "xxx"
189        self.analyser["osmosis_highway_link"] = "xxx"
190        self.analyser["osmosis_broken_highway_level_continuity"] = "xxx"
191        self.analyser["osmosis_relation_large"] = "xxx"
192        self.analyser["osmosis_mini_farm"] = "xxx"
193        self.analyser["osmosis_surface_overlaps"] = "xxx"
194        self.analyser["osmosis_useless"] = "xxx"
195        self.analyser["osmosis_relation_multipolygon"] = "xxx"
196        self.analyser["osmosis_boundary_intersect"] = "xxx"
197        self.analyser["osmosis_node_like_way"] = "xxx"
198        self.analyser["osmosis_boundary_administrative"] = "xxx"
199        self.analyser["osmosis_tag_typo"] = "xxx"
200        self.analyser["osmosis_cycleway_track"] = "xxx"
201        self.analyser["osmosis_feature_on_way"] = "xxx"
202        self.analyser["osmosis_building_shapes"] = "xxx"
203        self.analyser["osmosis_deadend"] = "xxx"
204        self.analyser["osmosis_boundary_relation"] = "xxx"
205        self.analyser["osmosis_highway_crossing"] = "xxx"
206        self.analyser["osmosis_relation_restriction"] = "xxx"
207        self.analyser["osmosis_tunnel_bridge"] = "xxx"
208        self.analyser["osmosis_waterway"] = "xxx"
209        self.analyser["osmosis_duplicated_geotag"] = "xxx"
210        self.analyser["osmosis_noexit"] = "xxx"
211
212class default_country(default_country_simple):
213    def __init__(self, part, country, polygon_id=None, analyser_options=None,
214                 download_repo=GEOFABRIK, download_country=None):
215
216        default_country_simple.__init__(self, part, country, polygon_id, analyser_options,
217                                        download_repo, download_country)
218        self.analyser["osmosis_highway_cul-de-sac_level"] = "xxx"
219        self.analyser["osmosis_way_approximate"] = "xxx"
220
221class default_country_fr(default_country):
222    def __init__(self, part, country, polygon_id=None, proj=None, analyser_options={},
223                 download_repo=GEOFABRIK, download_country=None):
224
225        analyser_options = dict({"country": "FR", "language": "fr", "proj": proj, "addr:city-admin_level": "8,9"}, **analyser_options)
226        default_country.__init__(self, part, country, polygon_id, analyser_options,
227                                        download_repo, download_country)
228
229class france_region(default_country_fr):
230    def __init__(self, region, polygon_id=None, proj=2154, analyser_options={},
231                 download_repo=GEOFABRIK, download_country=None):
232
233        default_country_fr.__init__(self, "europe", "france/" + region, polygon_id, proj, analyser_options,
234                                    download_repo, download_country)
235        self.analyser["osmosis_geodesie"] = "xxx"
236        self.analyser["osmosis_natural_swimming-pool"] = "xxx"
237        self.analyser["osmosis_fantoir"] = "xxx"
238
239france_region("alsace", 8636)
240france_region("aquitaine", 8637)
241france_region("auvergne", 8638)
242france_region("basse-normandie", 8646)
243france_region("bourgogne", 27768)
244france_region("bretagne", 102740)
245france_region("centre", 8640)
246france_region("champagne-ardenne", 8641)
247france_region("corse", 76910)
248france_region("franche-comte", 8642)
249france_region("haute-normandie", 8656)
250france_region("ile-de-france", 8649)
251france_region("languedoc-roussillon", 8643)
252france_region("limousin", 8644)
253france_region("lorraine", 8645)
254france_region("midi-pyrenees", 8647)
255france_region("nord-pas-de-calais", 8648)
256france_region("pays-de-la-loire", 8650)
257france_region("picardie", 8651)
258france_region("poitou-charentes", 8652)
259france_region("provence-alpes-cote-d-azur", 8654)
260france_region("rhone-alpes", 8655)
261france_region("guadeloupe", 1401835, 32620)
262france_region("guyane", 1260551, 2972)
263france_region("martinique", 1891495, 32620)
264france_region("mayotte", 1259885, 32738)
265france_region("reunion", 1785276, 2975)
266
267default_country_fr("central-america", "france_saintbarthelemy", 537967,
268                   proj=2969, download_repo=OSMFR, download_country="saint_barthelemy")
269default_country_fr("central-america", "france_saintmartin", 1891583,
270                   proj=2969, download_repo=OSMFR, download_country="saint_martin")
271default_country_fr("north-america", "france_saintpierreetmiquelon", 233377,
272                   proj=32621, download_repo=OSMFR, download_country="saint_pierre_et_miquelon")
273default_country_fr("oceania", "france_wallisetfutuna", 290162,
274                   proj=32701, download_repo=OSMFR, download_country="wallis_et_futuna")
275default_country_fr("oceania", "france_polynesie", 1363099,
276                   proj=32706, download_repo=OSMFR, download_country="polynesie")
277default_country("australia-oceania", "france_nouvellecaledonie", 3407643,
278                   download_repo=GEOFABRIK, download_country="new-caledonia", analyser_options={"country": "NC", "language": "fr", "proj": 3163})
279
280###########################################################################
281
282france_local_db = template_config("france_local_db", 1403916, {"country": "FR", "language": "fr", "proj": 2154})
283france_local_db.db_base     = "osm"
284france_local_db.db_user     = "osmose"
285france_local_db.db_password = "clostAdtoi"
286france_local_db.db_schema   = "\"$user\",osmosis"
287france_local_db.sql_post_scripts += [
288    france_local_db.dir_scripts + "/osmosis/CreateFunctions.sql",
289    france_local_db.dir_scripts + "/osmosis/CreateMergeAnalyserCache.sql",
290  ]
291
292france_local_db.analyser["merge_heritage_FR_merimee"] = "xxx"
293france_local_db.analyser["merge_poste_FR"] = "xxx"
294france_local_db.analyser["merge_school_FR"] = "xxx"
295france_local_db.analyser["merge_public_transport_FR_ratp"] = "xxx"
296france_local_db.analyser["merge_railway_level_crossing_FR"] = "xxx"
297france_local_db.analyser["merge_railway_railstation_FR"] = "xxx"
298france_local_db.analyser["merge_tmc_point_FR"] = "xxx"
299france_local_db.analyser["merge_geodesie"] = "xxx"
300france_local_db.analyser["merge_street_number"] = "xxx"
301france_local_db.analyser["merge_wikipedia_FR"] = "xxx"
302france_local_db.analyser["merge_wikipedia_insee_FR"] = "xxx"
303france_local_db.analyser["merge_college_FR"] = "xxx"
304france_local_db.analyser["merge_service_public_FR"] = "xxx"
305france_local_db.analyser["merge_public_transport_FR_transgironde"] = "xxx"
306france_local_db.analyser["merge_public_transport_FR_tbc"] = "xxx"
307france_local_db.analyser["merge_public_transport_FR_cg71"] = "xxx"
308france_local_db.analyser["merge_recycling_FR_cub"] = "xxx"
309france_local_db.analyser["merge_recycling_FR_capp_glass"] = "xxx"
310france_local_db.analyser["merge_recycling_FR_capp_clothes"] = "xxx"
311france_local_db.analyser["merge_parking_FR_capp"] = "xxx"
312france_local_db.analyser["merge_parking_FR_cub"] = "xxx"
313france_local_db.analyser["merge_tourism_FR_gironde_camp_caravan"] = "xxx"
314france_local_db.analyser["merge_tourism_FR_gironde_museum"] = "xxx"
315france_local_db.analyser["merge_tourism_FR_gironde_information"] = "xxx"
316france_local_db.analyser["merge_bicycle_parking_FR_bordeaux"] = "xxx"
317france_local_db.analyser["merge_bicycle_parking_FR_capp"] = "xxx"
318france_local_db.analyser["merge_bicycle_rental_FR_cub"] = "xxx"
319france_local_db.analyser["merge_bicycle_rental_FR_capp"] = "xxx"
320france_local_db.analyser["merge_public_equipment_FR_bordeaux_toilets"] = "xxx"
321france_local_db.analyser["merge_sport_FR_gironde_equestrian"] = "xxx"
322france_local_db.analyser["merge_pitch_FR"] = "xxx"
323france_local_db.analyser["merge_car_rental_FR_paris"] = "xxx"
324france_local_db.analyser["merge_police_FR"] = "xxx"
325france_local_db.analyser["merge_fuel_FR"] = "xxx"
326france_local_db.analyser["merge_pharmacy_FR"] = "xxx"
327france_local_db.analyser["merge_postal_code_FR"] = "xxx"
328france_local_db.analyser["merge_library_FR_aquitaine"] = "xxx"
329france_local_db.analyser["merge_winery_FR_aquitaine"] = "xxx"
330france_local_db.analyser["merge_restaurant_FR_aquitaine"] = "xxx"
331france_local_db.analyser["merge_restaurant_FR_cg71"] = "xxx"
332france_local_db.analyser["merge_geodesie_support_FR"] = "xxx"
333
334#########################################################################
335
336default_country("europe", "albania", 53292, {"country": "AL", "language": "sq", "proj": 32634})
337default_country("europe", "andorra", 9407, {"country": "AD", "language": "ca", "proj": 2154})
338default_country("europe", "azores",  1629146, {"country": "PT", "language": "pt", "proj": 32627}, download_repo=GEOFABRIK)
339#default_country("europe", "belgium", 52411, {"country": "BE", "language": "fr", "proj": 32631})
340default_country("europe", "belgium/brussels_capital_region", 54094, {"country": "BE", "language": ["fr", "nl"], "proj": 32631, "multilingual-style": "be"}, download_repo=OSMFR)
341default_country("europe", "belgium/flanders", 53134, {"country": "BE", "language": "nl", "proj": 32631}, download_repo=OSMFR)
342default_country("europe", "belgium/wallonia_french_community", 2620920, {"country": "BE", "language": "fr", "proj": 32631}, download_repo=OSMFR)
343default_country("europe", "belgium/wallonia_german_community", 2425209, {"country": "BE", "language": "de", "proj": 32631}, download_repo=OSMFR)
344default_country("europe", "bosnia-herzegovina", 2528142, {"country": "BA", "proj": 32633}, download_repo=GEOFABRIK)
345default_country("europe", "bulgaria", 186382, {"country": "BG", "language": "bg", "proj": 32635}, download_repo=GEOFABRIK)
346default_country("europe", "croatia", 214885, {"country": "HR", "language": "hr", "proj": 32633}, download_repo=GEOFABRIK)
347default_country("europe", "estonia", 79510, {"country": "EE", "language": "et", "proj": 32634}, download_repo=GEOFABRIK)
348default_country("europe", "cyprus", 307787, {"country": "CY", "driving_side": "left", "proj": 32636})
349default_country("europe", "faroe-islands", 52939, {"country": "FO", "language": "fo", "proj": 2169})
350default_country("europe", "greece",  192307, {"country": "GR", "language": "el","proj": 32635}, download_repo=GEOFABRIK)
351default_country("europe", "hungary", 21335, {"country": "HU", "language": "hu", "proj": 32633}, download_repo=GEOFABRIK)
352default_country("europe", "isle-of-man", 62269, {"country": "IM", "language": "en", "driving_side": "left", "proj": 32630})
353default_country("europe", "kosovo", 2088990, {"country": "XK", "proj": 32634})
354default_country("europe", "liechtenstein", 1155955, {"country": "LI", "language": "de", "proj": 32632})
355default_country("europe", "lithuania", 72596, {"country": "LT", "language": "lt", "proj": 32635}, download_repo=GEOFABRIK)
356default_country("europe", "latvia", 72594, {"country": "LV","language": "lv", "proj": 32634}, download_repo=GEOFABRIK)
357default_country("europe", "luxembourg", 2171347, {"country": "LU", "language": "fr", "proj": 2169, "osmosis_boundary_hole": {"admin_level": 6}})
358default_country("europe", "malta", 365307, {"country": "MT", "language": "en", "driving_side": "left", "proj": 32633})
359default_country("europe", "macedonia", 53293, {"country": "MK", "language": "sq", "proj": 32634})
360default_country("europe", "moldova", 58974, {"country": "MD", "language": "ro", "proj": 32635}, download_repo=GEOFABRIK)
361default_country("europe", "monaco", 1124039, {"country": "MC", "language": "fr", "proj": 2154}, download_repo=OSMFR)
362default_country("europe", "montenegro", 53296, {"country": "ME", "proj": 32634})
363default_country("europe", "norway", 1059668, {"country": "NO", "language": "no", "proj": 32632})
364default_country("europe", "portugal",  295480, {"country": "PT", "language": "pt", "proj": 32629}, download_repo=GEOFABRIK)
365default_country("europe", "romania", 90689, {"country": "RO", "language": "ro", "proj": 31700})
366default_country("europe", "serbia", 1741311, {"country": "RS", "language": "sr", "proj": 32634}, download_repo=GEOFABRIK)
367default_country("europe", "slovakia",  14296, {"country": "SK", "language": "sk","proj": 32634}, download_repo=GEOFABRIK)
368default_country("europe", "slovenia", 218657, {"country": "SI", "proj": 32633}, download_repo=GEOFABRIK)
369default_country("europe", "sweden", 52822, {"country": "SE", "language": "sv", "proj": 32633})
370default_country("europe", "switzerland", 51701, {"country": "CH", "proj": 2056})
371default_country("europe", "united_kingdom_wales", 58437, {"country": "GB", "driving_side": "left", "proj": 32630},
372                download_repo=GEOFABRIK, download_country="great-britain/wales")
373default_country("europe", "united_kingdom_scotland", 58446, {"country": "GB", "driving_side": "left", "proj": 32630},
374                download_repo=GEOFABRIK, download_country="great-britain/scotland")
375
376config["belgium_wallonia_french_community"].analyser["merge_public_transport_BE_wallonia"] = "xxx"
377config["belgium_wallonia_german_community"].analyser["merge_public_transport_BE_wallonia"] = "xxx"
378config["belgium_wallonia_french_community"].sql_post_scripts += [
379    config["belgium_wallonia_french_community"].dir_scripts + "/osmosis/CreateMergeAnalyserCache.sql",
380]
381config["belgium_wallonia_german_community"].sql_post_scripts += [
382    config["belgium_wallonia_german_community"].dir_scripts + "/osmosis/CreateMergeAnalyserCache.sql",
383]
384
385iceland = default_country("europe","iceland", 299133, {"country": "IS", "language": "is", "proj": 32627}) # 299133
386iceland.download["url"] = ""
387
388default_country("europe", "finland", 54224, {"country": "FI", "language": ["fi", "sv"],  "proj": 32635},download_repo=GEOFABRIK)
389default_country("europe", "denmark",  50046, {"country": "DK", "language": "da","proj": 32632}, download_repo=GEOFABRIK)
390
391#########################################################################
392
393default_country_simple("", "antarctica",  None, {"proj": 3031}, download_repo=GEOFABRIK)
394
395#########################################################################
396
397default_country("north-america", "greenland", 2184073, {"country": "GL", "language": "kl", "proj": 3184})
398
399default_country("north-america", "united_kingdom_bermuda", 1993208, {"country": "BM", "language": "en", "proj": 32620}, download_repo=OSMFR, download_country="bermuda")
400
401# United States of America
402class us_state(default_country):
403    def __init__(self, state, polygon_id=None, proj=None, analyser_options={},
404                 download_repo=GEOFABRIK, download_country=None):
405
406        analyser_options = dict({"country": "US", "language": "en", "proj": proj}, **analyser_options)
407        default_country.__init__(self, "north-america", "usa_" + state, polygon_id, analyser_options,
408                                    download_repo, download_country or ("us/" + state))
409
410us_state("alabama", 161950, 26916)
411us_state("alaska", 1116270, 26905)
412us_state("arizona", 162018, 26912)
413us_state("arkansas", 161646, 26715)
414us_state("california", 165475, 26910)
415us_state("colorado", 161961, 26713)
416us_state("connecticut", 165794, 3507)
417us_state("delaware", 162110, 3509)
418us_state("district-of-columbia", 162069, 3559)
419us_state("florida", 162050, 3513)
420us_state("georgia", 161957, 26917)
421us_state("hawaii", 166563, 2783) # note: projection for hawaii is the one used for center islands, not for the whole
422us_state("idaho", 162116, 3741)
423us_state("illinois", 122586, 3746)
424us_state("indiana", 161816, 3745)
425us_state("iowa", 161650, 3745)
426us_state("kansas", 161644, 3744)
427us_state("kentucky", 161655, 3088)
428us_louisiana = us_state("louisiana", 224922, 3745)
429del(us_louisiana.analyser["osmosis_waterway"]) # Too many swamp, not suitable
430us_state("maine", 63512, 3749)
431us_state("maryland", 162112, 26985)
432us_state("massachusetts", 61315, 2805)
433us_state("michigan", 165789, 3746)
434us_state("minnesota", 165471, 26992)
435us_state("mississippi", 161943, 3816)
436us_state("missouri", 161638, 3601)
437us_state("montana", 162115, 3604)
438us_state("nebraska", 161648, 3606)
439us_state("nevada", 165473, 3607)
440us_state("new-hampshire", 67213, 3613)
441us_state("new-jersey", 224951, 3615)
442us_state("new-mexico", 162014, 3617)
443us_state("new-york", 61320, 3623)
444us_state("north-carolina", 224045, 3631)
445us_state("north-dakota", 161653, 3633)
446us_state("ohio", 162061, 26917)
447us_state("oklahoma", 161645, 3639)
448us_state("oregon", 165476, 3643)
449us_state("pennsylvania", 162109, 3651)
450us_state("rhode-island", 392915, 3653)
451us_state("south-carolina", 224040, 3655)
452us_state("south-dakota", 161652, 3659)
453us_state("tennessee", 161838, 3661)
454us_state("texas", 114690, 3082)
455us_state("utah", 161993, 3675)
456us_state("vermont", 60759, 3684)
457us_state("virginia", 224042, 3968)
458us_state("washington", 165479, 3725)
459us_state("west-virginia",162068, 3747)
460us_state("wisconsin", 165466, 3695)
461us_state("wyoming", 161991, 26913)
462
463# Canada
464class canada_province(default_country):
465    def __init__(self, province, polygon_id=None, proj=None, analyser_options={},
466                 download_repo=GEOFABRIK, download_country=None):
467
468        analyser_options = dict({"country": "CA", "language": "en", "proj": proj}, **analyser_options)
469        default_country.__init__(self, "north-america", "canada_" + province, polygon_id, analyser_options,
470                                    download_repo, download_country or ("canada/" + province))
471
472quebec = default_country("north-america", "canada/quebec", 61549, {"country": "CA","language": "fr", "proj": 2138}, download_repo=OSMFR)
473quebec.download["diff"] = "http://download.openstreetmap.fr/replication/north-america/canada/quebec/minute/"
474quebec.db_base = "osmose_canada_quebec"
475
476canada_province("alberta", 391186, 32610)
477canada_province("british-columbia", 390867, 32609)
478canada_province("manitoba", 390841, 32615)
479canada_province("new-brunswick", 68942, 32619)
480canada_province("newfoundland-and-labrador", 391196, 32621)
481canada_province("northwest-territories", 391220, 32612)
482canada_province("nova-scotia", 390558, 32620)
483canada_province("nunavut", 390840, 32616)
484canada_province("ontario", 68841, 32616)
485canada_province("prince-edward-island", 391115, 32620)
486canada_province("saskatchewan", 391178, 32613)
487canada_province("yukon", 391455, 32608)
488
489#########################################################################
490
491default_country("africa", "algeria", 192756,  {"country": "DZ", "language": ["ar", "fr"], "proj": 32631}, download_repo=OSMFR)
492default_country_simple("africa", "angola", 195267, {"country": "AO", "language": "pt", "proj": 32733}, download_repo=OSMFR)
493default_country("africa", "benin", 192784,    {"country": "BJ", "language": "fr", "proj": 32631}, download_repo=OSMFR)
494default_country("africa", "botswana", 1889339, {"country": "BW", "language": "en", "driving_side": "left", "proj": 32734})
495default_country("africa", "burkina_faso", 192783, {"country": "BF", "language": "fr", "proj": 32630}, download_repo=OSMFR)
496default_country("africa", "burundi", 195269,  {"country": "BI", "proj": 32735}, download_repo=OSMFR)
497default_country_simple("africa", "cameroon", 192830, {"country": "CM", "proj": 32632}, download_repo=OSMFR)
498default_country_simple("africa", "cape_verde", 535774, {"country": "CV", "language": "pt", "proj": 32626}, download_repo=OSMFR)
499default_country("africa", "central_african_republic", 192790, {"country": "CF", "proj": 32634}, download_repo=OSMFR)
500default_country_simple("africa", "chad", 2361304,    {"country": "TD", "proj": 32634}, download_repo=OSMFR)
501default_country_simple("africa", "comoros", 535790, {"country": "KM", "proj": 32738}, download_repo=OSMFR)
502default_country("africa", "congo_brazzaville", 192794, {"country": "CG", "proj": 32733}, download_repo=OSMFR)
503default_country("africa", "congo_kinshasa", 192795, {"country": "CD", "proj": 32734}, download_repo=OSMFR)
504default_country_simple("africa", "djibouti", 192801, {"country": "DJ", "language": "fr", "proj": 32638}, download_repo=OSMFR)
505default_country("africa", "egypt", 1473947,   {"country": "EG", "language": "ar", "proj": 32635})
506default_country_simple("africa", "equatorial_guinea", 192791, {"country": "GQ", "language": "es", "proj": 32732}, download_repo=OSMFR)
507default_country_simple("africa", "eritrea", 296961, {"country": "ER", "proj": 32637}, download_repo=OSMFR)
508default_country("africa", "ethiopia", 192800, {"country": "ET", "language": "en", "proj": 32638})
509default_country_simple("africa", "gabon", 192793,    {"country": "GA", "language": "fr", "proj": 32732}, download_repo=OSMFR)
510default_country("africa", "gambia", 192774, {"country": "GM", "language": "en", "proj": 32628}, download_repo=OSMFR)
511default_country("africa", "ghana", 192781,    {"country": "GH", "language": "en", "proj": 32630}, download_repo=OSMFR)
512default_country("africa", "guinea", 192778,   {"country": "GN", "language": "fr", "proj": 32628}, download_repo=OSMFR)
513default_country("africa", "guinea-bissau", 192776, {"country": "GW", "language": "pt", "proj": 32628})
514default_country("africa", "ivory_coast", 192779, {"country": "CI", "language": "fr", "proj": 32630}, download_repo=OSMFR)
515default_country_simple("africa", "kenya", 192798,    {"country": "KE", "driving_side": "left", "proj": 32737}, download_repo=OSMFR)
516default_country_simple("africa", "lesotho", 2093234, {"country": "LS", "driving_side": "left", "proj": 32735}, download_repo=OSMFR)
517default_country_simple("africa", "liberia", 192780,  {"country": "LR", "language": "en", "proj": 32629})
518default_country("africa", "libya", 192758,    {"country": "LY", "language": "ar", "proj": 32633})
519default_country_simple("africa", "madagascar", 447325, {"country": "MG", "language": "fr", "proj": 32738}, download_repo=GEOFABRIK)
520default_country_simple("africa", "malawi", 195290, {"country": "MW", "driving_side": "left", "proj": 32736}, download_repo=OSMFR)
521default_country_simple("africa", "mali", 192785,     {"country": "ML", "language": "fr", "proj": 32630}, download_repo=OSMFR)
522default_country("africa", "mauritania", 192763, {"country": "MR", "proj": 32628}, download_repo=OSMFR)
523default_country_simple("africa", "mauritius", 535828, {"country": "MU", "driving_side": "left", "proj": 32740}, download_repo=OSMFR)
524default_country("africa", "morocco", 3630439,  {"country": "MA", "language": ["ar", "fr"], "proj": 32629, "multilingual-style": "ma"})
525default_country_simple("africa", "mozambique", 195273, {"country": "MZ", "language": "pt", "driving_side": "left", "proj": 32736}, download_repo=OSMFR)
526default_country_simple("africa", "namibia", 195266, {"country": "NA", "language": "en", "driving_side": "left", "proj": 32733}, download_repo=OSMFR)
527default_country("africa", "niger", 192786,    {"country": "NE", "language": "fr", "proj": 32632}, download_repo=OSMFR)
528default_country("africa", "nigeria", 192787,  {"country": "NG", "language": "en", "proj": 32633})
529default_country_simple("africa", "rwanda", 171496, {"country": "RW", "proj": 32735}, download_repo=OSMFR)
530default_country_simple("africa", "sao_tome_and_principe", 535880, {"country": "ST", "proj": 32632}, download_repo=OSMFR)
531default_country_simple("africa", "senegal", 192775,  {"country": "SN", "proj": 32628}, download_repo=OSMFR)
532default_country_simple("africa", "seychelles", 536765, {"country": "SC", "driving_side": "left", "proj": 32739}, download_repo=OSMFR)
533default_country("africa", "sierra-leone", 192777, {"country": "SL", "language": "en", "proj": 32629})
534default_country("africa", "somalia", 192799,  {"country": "SO", "language": "so", "proj": 32638})
535default_country_simple("africa", "south_africa", 87565, {"country": "ZA", "driving_side": "left", "proj": 32735}, download_repo=OSMFR)
536default_country_simple("africa", "south_sudan", 1656678, {"country": "SS", "language": "en", "proj": 32635}, download_repo=OSMFR)
537default_country_simple("africa", "sudan", 192789, {"country": "SD", "proj": 32636}, download_repo=OSMFR)
538default_country_simple("africa", "swaziland", 88210, {"country": "SZ", "driving_side": "left", "proj": 32736}, download_repo=OSMFR)
539default_country("africa", "tanzania", 195270, {"country": "TZ", "driving_side": "left", "proj": 32736})
540default_country_simple("africa", "togo", 192782,     {"country": "TG", "language": "fr", "proj": 32631}, download_repo=OSMFR)
541default_country("africa", "tunisia", 192757,  {"country": "TN", "language": ["ar", "fr"], "proj": 32632}, download_repo=OSMFR)
542default_country_simple("africa", "uganda", 192796, {"country": "UG", "driving_side": "left", "proj": 32636}, download_repo=OSMFR)
543default_country("africa", "western_sahara", 2559126, {"proj": 32629}, download_repo=OSMFR)
544default_country_simple("africa", "zambia", 195271, {"country": "ZM", "language": "en", "driving_side": "left", "proj": 32736}, download_repo=OSMFR)
545default_country_simple("africa", "zimbabwe", 195272, {"country": "ZW", "driving_side": "left", "proj": 32736}, download_repo=OSMFR)
546
547config["chad"].analyser["osmosis_way_approximate"] = "xxx"
548config["djibouti"].analyser["osmosis_way_approximate"] = "xxx"
549config["kenya"].analyser["osmosis_way_approximate"] = "xxx"
550config["madagascar"].analyser["osmosis_way_approximate"] = "xxx"
551config["mali"].analyser["osmosis_way_approximate"] = "xxx"
552config["senegal"].analyser["osmosis_way_approximate"] = "xxx"
553config["togo"].analyser["osmosis_way_approximate"] = "xxx"
554
555#########################################################################
556
557default_country_simple("asia", "azerbaijan", 364110, {"country": "AZ", "language": "az", "proj": 32638})
558default_country_simple("asia", "bangladesh", 184640, {"country": "BD", "language": "bn", "driving_side": "left", "proj": 32646})
559default_country_simple("asia", "brunei", 2103120, {"country": "BN", "driving_side": "left", "language": "ms", "proj": 32650}, download_repo=OSMFR)
560default_country_simple("asia", "cambodia", 49898 , {"country": "KHM", "language": "km", "proj": 32648}, download_repo=OSMFR)
561default_country_simple("asia", "iraq", 304934, {"country": "IQ", "language": "ar", "proj": 32638})
562default_country_simple("asia", "jordan", 184818, {"country": "JO", "language": "ar", "proj": 32637})
563default_country_simple("asia", "kyrgyzstan", 178009, {"country": "KG", "proj": 32643})
564default_country_simple("asia", "laos", 49903, {"country": "LA", "proj": 32648}, download_repo=OSMFR)
565default_country_simple("asia", "lebanon", 184843, {"country": "LB", "language": "ar", "proj": 32636})
566default_country_simple("asia", "malaysia", 2108121 , {"country": "MY", "language": "ms", "driving_side": "left", "proj": 32649}, download_repo=OSMFR)
567default_country_simple("asia", "mongolia", 161033, {"country": "MN", "language": "mn", "proj": 32648})
568default_country_simple("asia", "myanmar", 50371, {"country": "MM", "language": "my", "proj": 32646}, download_repo=OSMFR)
569default_country_simple("asia", "nepal", 184633, {"country": "NP", "language": "ne", "driving_side": "left", "proj": 32645})
570default_country_simple("asia", "pakistan", 307573, {"country": "PK", "driving_side": "left", "proj": 32642})
571default_country_simple("asia", "philippines", 2850940, {"country": "PH", "language": "en", "proj": 32651}, download_repo=GEOFABRIK)
572default_country_simple("asia", "singapore", 536780 , {"country": "SG", "driving_side": "left", "proj": 32648}, download_repo=OSMFR)
573default_country_simple("asia", "sri-lanka", 536807, {"country": "LK", "driving_side": "left", "proj": 32644})
574default_country_simple("asia", "syria", 184840, {"country": "SY", "language": "ar", "proj": 32637})
575default_country_simple("asia", "tajikistan", 214626, {"country": "TJ", "language": "tg", "proj": 32642})
576default_country_simple("asia", "thailand", 2067731, {"country": "TH", "language": "th", "proj": 32647, "driving_side": "left"})
577default_country_simple("asia", "turkmenistan", 223026, {"country": "TM", "language": "tk", "proj": 32640})
578default_country_simple("asia", "vietnam", 49915, {"country": "VN", "language": "vi", "proj": 32648}, download_repo=GEOFABRIK)
579
580#########################################################################
581
582# central america
583
584default_country("central-america", "belize", 287827, {"country": "BZ", "language": "en", "proj": 32616})
585default_country("central-america", "costa_rica", 287667, {"country": "CR", "language": "es", "proj": 32617}, download_repo=OSMFR)
586default_country("central-america", "el_salvador", 1520612, {"country": "SV", "language": "es", "proj": 32616}, download_repo=OSMFR)
587default_country("central-america", "guatemala", 1521463, {"country": "GT", "language": "es", "proj": 32616})
588default_country("central-america", "honduras", 287670, {"country": "HN", "language": "es", "proj": 32616}, download_repo=OSMFR)
589default_country("central-america", "mexico", 114686, {"country": "MX", "language": "es", "proj": 32614}, download_repo=GEOFABRIK)
590default_country_simple("central-america", "panama", 287668, {"country": "PA", "language": "es", "proj": 32617}, download_repo=OSMFR)
591
592
593# caribbean
594
595default_country_simple("central-america", "haiti", 307829, {"country": "HT", "language": "fr", "proj": 32618},
596                       download_repo=GEOFABRIK, download_country="haiti-and-domrep")
597
598config["haiti"].analyser["osmosis_way_approximate"] = "xxx"
599
600default_country("central-america", "antigua_and_barbuda", 536900, {"country": "BB", "language": "en", "driving_side": "left", "proj": 32620}, download_repo=OSMFR)
601default_country("central-america", "barbados", 547511, {"country": "BB", "language": "en", "proj": 32621}, download_repo=OSMFR)
602default_country("central-america", "bahamas", 547469, {"country": "BS", "language": "en", "driving_side": "left", "proj": 32620}, download_repo=OSMFR)
603default_country("central-america", "cuba", 307833, {"country": "CU", "language": "es", "proj": 32617})
604default_country("central-america", "dominica", 307823, {"country": "DM", "driving_side": "left", "proj": 32620}, download_repo=OSMFR)
605default_country("central-america", "dominican_republic", 307828, {"country": "DO", "language": "en", "proj": 32619},
606                       download_repo=GEOFABRIK, download_country="haiti-and-domrep")
607default_country("central-america", "grenada", 550727, {"country": "GD", "language": "en", "driving_side": "left", "proj": 32620}, download_repo=OSMFR)
608default_country("central-america", "jamaica", 555017, {"country": "JM", "language": "en", "driving_side": "left", "proj": 32620}, download_repo=OSMFR)
609default_country("central-america", "nicaragua", 287666, {"country": "NI", "language": "es", "proj": 32616}, download_repo=OSMFR)
610default_country("central-america", "saint_lucia", 550728, {"country": "LC", "driving_side": "left", "proj": 32620}, download_repo=OSMFR)
611default_country("central-america", "saint_vincent_and_the_grenadines", 550725, {"country": "VC", "language": "en", "proj": 32620}, download_repo=OSMFR)
612default_country("central-america", "saint_kitts_and_nevis", 536899, {"country": "KN", "language": "en", "driving_side": "left", "proj": 2005}, download_repo=OSMFR)
613default_country("central-america", "united_kingdom_anguilla", 2177161, {"country": "AI", "language": "en", "driving_side": "left", "proj": 32620}, download_repo=OSMFR, download_country="anguilla")
614default_country("central-america", "united_kingdom_cayman_islands", 2185366, {"country": "KY", "language": "en", "driving_side": "left", "proj": 32617}, download_repo=OSMFR, download_country="cayman_islands")
615default_country("central-america", "united_kingdom_montserrat", 537257, {"country": "MS", "language": "en", "driving_side": "left", "proj": 2005}, download_repo=OSMFR, download_country="montserrat")
616default_country("central-america", "united_kingdom_turks_and_caicos_islands", 547479, {"country": "TC", "language": "en", "driving_side": "left", "proj": 32619}, download_repo=OSMFR, download_country="turks_and_caicos_islands")
617default_country("central-america", "united_kingdom_virgin_islands", 285454, {"country": "VG", "language": "en", "driving_side": "left", "proj": 32620}, download_repo=OSMFR, download_country="british_virgin_islands")
618default_country("central-america", "usa_puerto_rico", 4422604, {"country": "PR", "language": ["es", "en"], "proj": 32619}, download_repo=OSMFR, download_country="puerto_rico")
619default_country("central-america", "usa_virgin_islands", 286898, {"country": "VI", "language": "en", "proj": 4437}, download_repo=OSMFR, download_country="usa_virgin_islands")
620
621
622#########################################################################
623
624default_country("australia-oceania", "new-zealand", 556706, {"country": "NZ", "language": "en", "proj": 32759, "driving_side": "left"})
625
626#########################################################################
627
628default_country("south-america", "argentina", 286393, {"country": "AR", "language": "es", "proj": 32720})
629default_country("south-america", "bolivia", 252645, {"country": "BO", "language": "es", "proj": 32720})
630default_country("south-america", "brazil", 59470, {"country": "BR", "language": "pt", "proj": 32722})
631default_country("south-america", "chile", 167454, {"country": "CL", "language": "es", "proj": 32718})
632default_country("south-america", "colombia", 120027, {"country": "CO", "language": "es", "proj": 32618})
633default_country("south-america", "ecuador", 108089, {"country": "EC", "language": "es", "proj": 32727})
634default_country_simple("south-america", "guyana", 287083, {"country": "GY", "language": "en", "driving_side": "left", "proj": 32621}, download_repo=OSMFR)
635default_country("south-america", "paraguay", 287077, {"country": "PY", "language": "es", "proj": 32721}, download_repo=OSMFR)
636default_country("south-america", "peru", 288247, {"country": "PE", "language": "es", "proj": 32718})
637default_country("south-america", "trinidad_and_tobago", 555717, {"country": "TT", "language": "en", "driving_side": "left","proj": 32620}, download_repo=OSMFR)
638default_country_simple("south-america", "suriname", 287082, {"country": "SR", "language": "nl", "proj": 32621}, download_repo=OSMFR)
639default_country("south-america", "uruguay", 287072, {"country": "UY", "language": "es", "proj": 32721})
640default_country("south-america", "venezuela", 272644, {"country": "VE", "language": "es", "proj": 32620}, download_repo=OSMFR)
641
642#########################################################################
643
644class it_region(default_country):
645    def __init__(self, region, polygon_id=None, proj=23032, analyser_options={},
646                 download_repo=FMACH, download_country=None):
647
648        part = "gfoss_geodata/osm/output_osm_regioni/"
649        analyser_options = dict({"country": "IT", "language": "it", "proj": proj}, **analyser_options)
650        default_country.__init__(self, part, "italy/" + region, polygon_id, analyser_options,
651                                    download_repo, download_country)
652
653        self.download["url"] = self.download_repo + part + "/" + region + ".pbf"
654        self.download["poly"] = self.download_repo + part + "/" + region + ".poly"
655
656# FMACH
657it_region("abruzzo", 53937)
658it_region("basilicata", 40137)
659it_region("calabria", 1783980)
660it_region("campania", 40218)
661it_region("emilia-romagna", 42611)
662it_region("friuli-venezia-giulia", 179296)
663it_region("lazio", 40784)
664it_region("liguria", 301482)
665it_region("lombardia", 44879)
666it_region("marche", 53060)
667it_region("molise", 41256)
668it_region("piemonte", 44874)
669it_region("puglia", 40095)
670it_region("sardegna", 279816)
671it_region("sicilia", 39152)
672it_region("toscana", 41977)
673it_region("trentino-alto-adige", 45757, analyser_options={"language": ["it","de"]})
674it_region("umbria", 42004)
675it_region("valle-aosta", 2905554)
676it_region("veneto", 43648)
677
678#########################################################################
679
680class nl_province(default_country):
681    def __init__(self, province, polygon_id=None, part="europe/netherlands", proj=23032, analyser_options={},
682                 download_repo=OSMFR, download_country=None):
683
684        download_country = province.replace("-", "_")
685        country = "netherlands_" + province
686        analyser_options = dict({"country": "NL", "language": "nl", "proj": proj}, **analyser_options)
687        default_country.__init__(self, part, country, polygon_id, analyser_options,
688                                    download_repo, download_country)
689        del(self.analyser["osmosis_mini_farm"]) # Landuse are really too detailed in Netherlands to use this analyser
690
691nl_province("zuid-holland", 47772)
692nl_province("zeeland", 47806)
693nl_province("noord-brabant", 47696)
694nl_province("limburg", 47793)
695nl_province("gelderland", 47554)
696nl_province("overijssel", 47608)
697nl_province("drenthe", 47540)
698nl_province("friesland", 47381, analyser_options={"language": ["nl", "fy"]})
699nl_province("groningen", 47826)
700nl_province("flevoland", 47407)
701nl_province("utrecht", 47667)
702nl_province("noord-holland", 47654)
703
704nl_province("aruba",        1231749, part="central-america", proj=32620)
705nl_province("curacao",      1216719, part="central-america", proj=32620)
706nl_province("sint-maarten", 1231790, part="central-america", proj=32620)
707nl_province("caribbean",    1216720, part="central-america", proj=32620)
708
709#########################################################################
710
711class cz_kraj(default_country):
712    def __init__(self, kraj, polygon_id=None, proj=32633, analyser_options={},
713                 download_repo=OSMFR, download_country=None):
714
715        analyser_options = dict({"country": "CZ", "language": "cs", "proj": proj}, **analyser_options)
716        default_country.__init__(self, "europe", "czech_republic/" + kraj, polygon_id, analyser_options,
717                                    download_repo, download_country)
718
719cz_kraj("praha", 435514)
720cz_kraj("stredocesky", 442397)
721cz_kraj("jihocesky", 442321)
722cz_kraj("plzensky", 442466)
723cz_kraj("karlovarsky", 442314)
724cz_kraj("ustecky", 442452)
725cz_kraj("liberecky", 442455)
726cz_kraj("kralovehradecky", 442463)
727cz_kraj("pardubicky", 442460)
728cz_kraj("vysocina", 442453)
729cz_kraj("jihomoravsky", 442311)
730cz_kraj("olomoucky", 442459)
731cz_kraj("moravskoslezsky", 442461)
732cz_kraj("zlinsky", 442449)
733
734#########################################################################
735
736class pl_province(default_country):
737    def __init__(self, province, polygon_id=None, proj=32634, analyser_options={},
738                 download_repo=OSMFR, download_country=None):
739
740        analyser_options = dict({"country": "PL", "language": "pl", "proj": proj}, **analyser_options)
741        default_country.__init__(self, "europe", "poland/" + province, polygon_id, analyser_options,
742                                    download_repo, download_country)
743
744pl_province("dolnoslaskie", 224457)
745pl_province("kujawsko_pomorskie", 223407)
746pl_province("lubelskie", 130919)
747pl_province("lubuskie", 130969)
748pl_province("lodzkie", 224458)
749pl_province("malopolskie", 224459)
750pl_province("mazowieckie", 130935)
751pl_province("opolskie", 224460)
752pl_province("podkarpackie", 130957)
753pl_province("podlaskie", 224461)
754pl_province("pomorskie", 130975)
755pl_province("slaskie", 224462)
756pl_province("swietokrzyskie", 130914)
757pl_province("warminsko_mazurskie", 223408)
758pl_province("wielkopolskie", 130971)
759pl_province("zachodniopomorskie", 104401)
760
761#########################################################################
762
763class de_state(default_country):
764    def __init__(self, province, polygon_id=None, proj=32632, analyser_options={},
765                 download_repo=GEOFABRIK, download_country=None):
766
767        analyser_options = dict({"country": "DE", "language": "de", "proj": proj}, **analyser_options)
768        default_country.__init__(self, "europe", "germany/" + province, polygon_id, analyser_options,
769                                    download_repo, download_country)
770
771de_state("baden-wuerttemberg", 62611)
772de_state("bayern", 2145268)
773de_state("berlin", 62422)
774de_state("brandenburg", 62504)
775de_state("bremen", 62718)
776de_state("hamburg", 62782)
777de_state("hessen", 62650)
778de_state("mecklenburg-vorpommern", 28322)
779de_state("niedersachsen", 454192)
780de_state("nordrhein-westfalen", 62761)
781de_state("rheinland-pfalz", 62341)
782de_state("saarland", 62372)
783de_state("sachsen-anhalt", 62607)
784de_state("sachsen", 62467)
785de_state("schleswig-holstein", 51529)
786de_state("thueringen", 62366)
787
788#########################################################################
789
790class at_state(default_country):
791    def __init__(self, province, polygon_id=None, proj=32633, analyser_options={},
792                 download_repo=OSMFR, download_country=None):
793
794        analyser_options = dict({"country": "AT", "language": "de", "proj": proj}, **analyser_options)
795        default_country.__init__(self, "europe", "austria/" + province, polygon_id, analyser_options,
796                                    download_repo, download_country)
797
798at_state("niederosterreich", 77189)
799at_state("burgenland", 76909)
800at_state("karnten", 52345)
801at_state("oberosterreich", 102303)
802at_state("salzburg", 86539)
803at_state("steiermark", 35183)
804at_state("tirol", 52343)
805at_state("wien", 109166)
806at_state("vorarlberg", 74942)
807
808#########################################################################
809# Passwords are stored in separate file, not on git repository
810import osmose_config_password
811
812osmose_config_password.set_password(config)
Note: See TracBrowser for help on using the repository browser.