From b6132e594c6ad695fd9f8ad34a9dca47d82fd030 Mon Sep 17 00:00:00 2001 From: Maksim Andrianov Date: Wed, 26 Jun 2019 19:13:03 +0300 Subject: [PATCH] [generator][python] Fixed typos. --- tools/python/maps_generator/README.md | 8 ++++---- tools/python/maps_generator/__main__.py | 24 ++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/tools/python/maps_generator/README.md b/tools/python/maps_generator/README.md index a8f1649b08..ec87bc28e5 100644 --- a/tools/python/maps_generator/README.md +++ b/tools/python/maps_generator/README.md @@ -10,12 +10,11 @@ Further we will call them world and coastlines. ## Setup You must have Python version not lower than 3.6 and complete the following steps: - -0. Change directory: +0. [Build and install generator_tool.](https://github.com/mapsme/omim/blob/master/docs/INSTALL.md#maps-generator) +1. Change directory: ```sh $ cd omim/tools/python/maps_generator ``` -1. [Build and install generator_tool.](https://github.com/mapsme/omim/blob/master/docs/INSTALL.md#maps-generator) 2. Install dependencies: ```sh maps_generator$ pip3 install -r requirements.txt @@ -139,7 +138,8 @@ optional arguments: countries_txt, external_resources, localads, statistics, cleanup, index, ugc, popularity, srtm, routing, routing_transit. - --coasts Build WorldCoasts.raw and WorldCoasts.rawgeom files + --coasts Build only WorldCoasts.raw and WorldCoasts.rawgeom + files --production Build production maps. In another case, 'osm only maps' are built - maps without additional data and advertising. diff --git a/tools/python/maps_generator/__main__.py b/tools/python/maps_generator/__main__.py index 5fc08a2bdb..842d0671e5 100644 --- a/tools/python/maps_generator/__main__.py +++ b/tools/python/maps_generator/__main__.py @@ -17,7 +17,7 @@ logger = logging.getLogger("maps_generator") examples = """Examples: -1) Non-standard planet +1) Non-standard planet with coastlines If you want to generate maps for Japan you must complete the following steps: 1. Open https://download.geofabrik.de/asia/japan.html and copy url of osm.pbf and md5sum files. @@ -35,7 +35,7 @@ examples = """Examples: ... 3. Run - python$ python3.6 -m maps_generator --countries="World, WorldCoasts, Japan_*" --skip="update_planet" + python$ python3.6 -m maps_generator --countries="World, WorldCoasts, Japan_*" You must skip the step of updating the planet, because it is a non-standard planet. 2) Rebuild stages: @@ -43,6 +43,26 @@ examples = """Examples: You must have previous generation. You may regenerate from stage routing only for two mwms: python$ python3.6 -m maps_generator -c --from_stage="routing" --countries="Japan_Kinki Region_Osaka_Osaka, Japan_Chugoku Region_Tottori" + + Note: To generate maps with the coastline, you need more time and you need the planet to contain a continuous coastline. + +3) Non-standard planet without coastlines + If you want to generate maps for Moscow you must complete the following steps: + 1. Open https://download.geofabrik.de/russia/central-fed-district.html and copy url of osm.pbf and md5sum files. + 2. Edit ini file: + maps_generator$ vim var/etc/map_generator.ini + ... + [Main] + ... + DEBUG: 0 + ... + [External] + PLANET_URL: https://download.geofabrik.de/russia/central-fed-district-latest.osm.pbf + PLANET_MD5_URL: https://download.geofabrik.de/russia/central-fed-district-latest.osm.pbf.md5 + ... + + 3. Run + python$ python3.6 -m maps_generator --countries="Russia_Moscow" --skip="coastline" """