From aa437fb5c8c9d37d251223c0d7dfafcebb3ab7ed Mon Sep 17 00:00:00 2001 From: vng Date: Thu, 5 May 2011 18:45:48 +0300 Subject: [PATCH] - Set world generation scales to 9. - Highway merging during world generation. --- generator/world_map_generator.hpp | 15 ++++++++++++++- indexer/feature_impl.hpp | 4 ++-- indexer/scales.hpp | 2 +- tools/unix/build_common_planet.sh | 2 +- tools/unix/polygons.sh | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/generator/world_map_generator.hpp b/generator/world_map_generator.hpp index 83363908cf..98ff0ea3ce 100644 --- a/generator/world_map_generator.hpp +++ b/generator/world_map_generator.hpp @@ -119,7 +119,20 @@ public: static size_t const MAX_TYPES_IN_PATH = 3; char const * arrMerge[][MAX_TYPES_IN_PATH] = { {"natural", "coastline", ""}, - {"boundary", "administrative", "2"} + {"boundary", "administrative", "2"}, + + {"highway", "motorway", ""}, + {"highway", "motorway_link", ""}, + {"highway", "motorway", "oneway"}, + {"highway", "motorway_link", "oneway"}, + + {"highway", "primary", ""}, + {"highway", "primary_link", ""}, + + {"highway", "trunk", ""}, + {"highway", "trunk_link", ""}, + + {"natural", "water", ""} }; for (size_t i = 0; i < ARRAY_SIZE(arrMerge); ++i) diff --git a/indexer/feature_impl.hpp b/indexer/feature_impl.hpp index b13bedab6d..75c41bf034 100644 --- a/indexer/feature_impl.hpp +++ b/indexer/feature_impl.hpp @@ -22,8 +22,8 @@ namespace feature } - static int g_arrWorldScales[] = { 2, 4, 5, 6 }; // 6 = scales::GetUpperWorldScale() - static int g_arrCountryScales[] = { 7, 10, 14, 17 }; // 17 = scales::GetUpperScale() + static int g_arrWorldScales[] = { 2, 5, 7, 9 }; // 9 = scales::GetUpperWorldScale() + static int g_arrCountryScales[] = { 10, 12, 14, 17 }; // 17 = scales::GetUpperScale() inline string GetTagForIndex(char const * prefix, int ind) { diff --git a/indexer/scales.hpp b/indexer/scales.hpp index 6fd46a9ee8..269af92678 100644 --- a/indexer/scales.hpp +++ b/indexer/scales.hpp @@ -5,7 +5,7 @@ namespace scales { inline int GetUpperScale() { return 17; } - inline int GetUpperWorldScale() { return 6; } + inline int GetUpperWorldScale() { return 9; } double GetM2PFactor(int level); int GetScaleLevel(double ratio); diff --git a/tools/unix/build_common_planet.sh b/tools/unix/build_common_planet.sh index 4e86a4eb6d..ff1eab11f0 100755 --- a/tools/unix/build_common_planet.sh +++ b/tools/unix/build_common_planet.sh @@ -110,7 +110,7 @@ fi # 2nd pass - not paralleled $PV $OSM_BZ2 | bzip2 -d | $GENERATOR_TOOL --intermediate_data_path=$TMPDIR \ --use_light_nodes=$LIGHT_NODES --bucketing_level=$BUCKETING_LEVEL \ - --generate_features --generate_world_scale=5 \ + --generate_features --generate_world_scale=9 \ --data_path=$DATA_PATH # 3rd pass - do in parallel diff --git a/tools/unix/polygons.sh b/tools/unix/polygons.sh index db94911a1b..fd6c61e93f 100755 --- a/tools/unix/polygons.sh +++ b/tools/unix/polygons.sh @@ -117,7 +117,7 @@ fi # 2nd pass - not paralleled $PV $OSM_BZ2 | bzip2 -d | $GENERATOR_TOOL --intermediate_data_path=$TMPDIR \ --use_light_nodes=$LIGHT_NODES --split_by_polygons --simplify_countries_level=$SIMPLIFY \ - --generate_features --generate_world_scale=6 --merge_coastlines=true \ + --generate_features --generate_world_scale=9 --merge_coastlines=true \ --data_path=$DATA_PATH # 3rd pass - do in parallel