diff --git a/tools/python/maps_generator/__main__.py b/tools/python/maps_generator/__main__.py index 52254e5b18..4cb2c74c58 100644 --- a/tools/python/maps_generator/__main__.py +++ b/tools/python/maps_generator/__main__.py @@ -58,7 +58,8 @@ def parse_options(): "--without_countries", type=str, default="", - help="List of countries/regions to exclude from generation. Syntax is the same as for --countries.", + help="List of countries/regions to exclude from generation. " + "Has a priority over --countries and uses the same syntax.", ) parser.add_argument( "--skip", @@ -127,13 +128,6 @@ def main(): ) build_name = d - # Processing of 'countries' option. - # There is processing 'countries' and 'without_countries' options. - # Option 'without_countries' has more priority than 'countries'. - # Options 'countries' and 'without_countries' can include '*'. - # For example: '--countries="UK*, Japan"*' means - # '--countries="UK_England_East Midlands, UK_England_East of England_Essex, ..., - # Japan_Chubu Region_Aichi_Nagoya, Japan_Chubu Region_Aichi_Toyohashi, ..."'. countries_line = "" without_countries_line = "" if "COUNTRIES" in os.environ: diff --git a/tools/python/maps_generator/generator/settings.py b/tools/python/maps_generator/generator/settings.py index ed2223de3f..391a2c9430 100644 --- a/tools/python/maps_generator/generator/settings.py +++ b/tools/python/maps_generator/generator/settings.py @@ -49,7 +49,7 @@ class CfgReader: 3. From default values. For using the option from system env you can build an option name as - MM__ + [SECTION_NAME] + _ + [VALUE_NAME]. + MM__GEN__ + [SECTION_NAME] + _ + [VALUE_NAME]. """ def __init__(self, default_settings_path: AnyStr): @@ -72,7 +72,6 @@ class CfgReader: DEFAULT_PLANET_URL = "https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf" -DEFAULT_PLANET_MD5_URL = md5_ext(DEFAULT_PLANET_URL) # Main section: # If DEBUG is True, a little special planet is downloaded. @@ -106,7 +105,6 @@ LOG_FILE_PATH = os.path.join(MAIN_OUT_PATH, "generation.log") # External resources section: PLANET_URL = DEFAULT_PLANET_URL -PLANET_MD5_URL = DEFAULT_PLANET_MD5_URL PLANET_COASTS_URL = "" UGC_URL = "" HOTELS_URL = "" @@ -278,7 +276,7 @@ def init(default_settings_path: AnyStr): global ISOLINES_PATH PLANET_URL = cfg.get_opt_path("External", "PLANET_URL", PLANET_URL) - PLANET_MD5_URL = cfg.get_opt_path("External", "PLANET_MD5_URL", PLANET_MD5_URL) + PLANET_MD5_URL = cfg.get_opt_path("External", "PLANET_MD5_URL", md5_ext(PLANET_URL)) PLANET_COASTS_URL = cfg.get_opt_path( "External", "PLANET_COASTS_URL", PLANET_COASTS_URL ) diff --git a/tools/python/maps_generator/var/etc/map_generator.ini.default b/tools/python/maps_generator/var/etc/map_generator.ini.default index 4dbd6e4b6f..1980e5f528 100644 --- a/tools/python/maps_generator/var/etc/map_generator.ini.default +++ b/tools/python/maps_generator/var/etc/map_generator.ini.default @@ -40,9 +40,9 @@ LOG_FILE_PATH: ${Main:MAIN_OUT_PATH}/generation.log [External] -# Planet file location. It should be a dump of OSM data in osm.pbf format, -# either an entire planet (from "planet.openstreetmap.org") or a particular -# country/region extract from e.g. [Geofabrik](http://download.geofabrik.de/index.html). +# Planet file location. It should be a dump of OSM data in osm.pbf format. +# By default its an entire planet from "planet.openstreetmap.org". +# Or set it to a particular country/region extract from e.g. [Geofabrik](http://download.geofabrik.de/index.html). # Note that an entire planet generation takes 40+ hours on a 256GB RAM server (and 1TB+ disk space). # Stick to smaller extracts unless you have a machine this large. # Here and further, its possible to specify either an URL (to be downloaded automatically) @@ -50,16 +50,15 @@ LOG_FILE_PATH: ${Main:MAIN_OUT_PATH}/generation.log # A sample URL to download a latest OSM dump for North Macedonia: PLANET_URL: https://download.geofabrik.de/europe/macedonia-latest.osm.pbf # Location of the md5 checksum of the planet file: -PLANET_MD5_URL: https://download.geofabrik.de/north-america/canada/yukon-latest.osm.pbf.md5 +PLANET_MD5_URL: ${External:PLANET_URL}.md5 # A base url to the latest_coasts.geom and latest_coasts.rawgeom files. # For example, if PLANET_COASTS_URL = https://somesite.com/download/ # then the https://somesite.com/download/latest_coasts.geom url will be used to download latest_coasts.geom and # the https://somesite.com/download/latest_coasts.rawgeom url will be used to download latest_coasts.rawgeom. # Comment to skip getting the coastlines files. # PLANET_COASTS_URL: -# Set to 'true' to build a special routing section in World.mwm +# Should be 'true' for an entire planet build to make a special routing section in World.mwm # for alerting about absent regions without which the route can't be built. -# This should be true for any non-planet build. NEED_BUILD_WORLD_ROADS: false # Subway file location, see docs/SUBWAY_GENERATION.md if you want to generate your own file. # Comment to disable subway layer generation.