Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMaksim Andrianov <maksimandrianov1@gmail.com>2019-06-03 16:47:07 +0300
committerArsentiy Milchakov <milcars@mapswithme.com>2019-06-07 16:28:50 +0300
commit2a88c6ca5f90a14fdc6fb6ed47ec8dc86548187d (patch)
tree58afc60da5499d3e1a57e199bea7998e143af820 /tools
parent96b2fa6c7f027705772bff8dc6e2770430f0daee (diff)
[python] Added packed_polygons generation.
Diffstat (limited to 'tools')
-rw-r--r--tools/python/maps_generator/generator/env.py4
-rw-r--r--tools/python/maps_generator/generator/gen_tool.py1
-rw-r--r--tools/python/maps_generator/maps_generator.py4
3 files changed, 9 insertions, 0 deletions
diff --git a/tools/python/maps_generator/generator/env.py b/tools/python/maps_generator/generator/env.py
index 4c64d75d7d..0710579267 100644
--- a/tools/python/maps_generator/generator/env.py
+++ b/tools/python/maps_generator/generator/env.py
@@ -156,6 +156,10 @@ class Env:
return path
@property
+ def packed_polygons_path(self):
+ return os.path.join(self.intermediate_path, "packed_polygons.bin")
+
+ @property
def localads_path(self):
path = os.path.join(self.out_path, f"localads_{self.mwm_version}")
self._create_if_not_exist(path)
diff --git a/tools/python/maps_generator/generator/gen_tool.py b/tools/python/maps_generator/generator/gen_tool.py
index 9418ff3e54..becf2a62fc 100644
--- a/tools/python/maps_generator/generator/gen_tool.py
+++ b/tools/python/maps_generator/generator/gen_tool.py
@@ -22,6 +22,7 @@ class GenTool:
"generate_geo_objects_index": bool,
"generate_index": bool,
"generate_maxspeed": bool,
+ "generate_packed_borders": bool,
"generate_popular_places": bool,
"generate_region_features": bool,
"generate_regions": bool,
diff --git a/tools/python/maps_generator/maps_generator.py b/tools/python/maps_generator/maps_generator.py
index eff4bb5c71..15fde3c696 100644
--- a/tools/python/maps_generator/maps_generator.py
+++ b/tools/python/maps_generator/maps_generator.py
@@ -86,6 +86,7 @@ def stage_features(env):
extra["no_ads"] = True
if any(x not in WORLDS_NAMES for x in env.countries):
extra["split_by_polygons"] = True
+ extra["generate_packed_borders"] = True
if any(x == WORLD_NAME for x in env.countries):
extra["generate_world"] = True
@@ -106,6 +107,9 @@ def stage_features(env):
**extra
)
+ if os.path.exists(env.packed_polygons_path):
+ shutil.copy2(env.packed_polygons_path, env.mwm_path)
+
@stage
def stage_coastline(env):