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
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-05-24 18:42:31 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:39:06 +0300
commit45a9a82f82dd1956361adadd2b125c5ef38fd523 (patch)
tree95fbb943731d04fd32e5da0db6c7406035d04783
parentda469602e10e91bd162308f4a6130b42d5d704fd (diff)
[generator] Add ramp numbers ("ref" attribute for highway-motorway_junction).
-rw-r--r--data/drules_proto.txt7
-rw-r--r--data/visibility.txt2
-rw-r--r--generator/feature_builder.cpp11
-rw-r--r--indexer/feature_visibility.cpp14
-rw-r--r--indexer/feature_visibility.hpp1
5 files changed, 29 insertions, 6 deletions
diff --git a/data/drules_proto.txt b/data/drules_proto.txt
index 60101fd947..2c0177a23b 100644
--- a/data/drules_proto.txt
+++ b/data/drules_proto.txt
@@ -12624,6 +12624,7 @@ cont {
primary {
height: 12
color: 0x404040
+ stroke_color: 0xFFFFFF
}
priority: 594
}
@@ -12634,6 +12635,7 @@ cont {
primary {
height: 12
color: 0x404040
+ stroke_color: 0xFFFFFF
}
priority: 594
}
@@ -12644,6 +12646,7 @@ cont {
primary {
height: 12
color: 0x404040
+ stroke_color: 0xFFFFFF
}
priority: 594
}
@@ -12654,7 +12657,7 @@ cont {
primary {
height: 12
color: 0x202020
- stroke_color: 0xf08800
+ stroke_color: 0xFFFFFF
}
priority: 914
}
@@ -12665,7 +12668,7 @@ cont {
primary {
height: 12
color: 0x202020
- stroke_color: 0xf08800
+ stroke_color: 0xFFFFFF
}
priority: 1524
}
diff --git a/data/visibility.txt b/data/visibility.txt
index 9d680ed1d0..113723c8e5 100644
--- a/data/visibility.txt
+++ b/data/visibility.txt
@@ -305,7 +305,7 @@ world 000000000000000000 +
oneway 000000000000000111 -
tunnel 000000011111111111 -
{}
- motorway_junction 000000000000001111 -
+ motorway_junction 000000000000011111 -
motorway_link 000000011111111111 +
area 000000000000111111 -
bridge 000000000000000011 -
diff --git a/generator/feature_builder.cpp b/generator/feature_builder.cpp
index 94b5c7e43e..dc3e3e2211 100644
--- a/generator/feature_builder.cpp
+++ b/generator/feature_builder.cpp
@@ -163,12 +163,17 @@ bool FeatureBuilder1::PreSerialize()
if (m_Params.name.IsEmpty() && !m_Params.house.IsEmpty())
m_Params.name.AddString(0, m_Params.house.Get());
- m_Params.ref = string();
+ // We need refs for motorway's junctions. Try to update name always, not only for junctions.
+ // if (feature::IsJunction(m_Params.m_Types)) { ... }
+ if (m_Params.name.IsEmpty() && !m_Params.ref.empty())
+ m_Params.name.AddString(0, m_Params.ref);
+
m_Params.house.Clear();
+ m_Params.ref.clear();
break;
case GEOM_LINE:
- // We need refs only for road numbers.
+ // We need refs for road's numbers.
if (!feature::IsHighway(m_Params.m_Types))
m_Params.ref = string();
@@ -178,7 +183,7 @@ bool FeatureBuilder1::PreSerialize()
case GEOM_AREA:
m_Params.rank = 0;
- m_Params.ref = string();
+ m_Params.ref.clear();
break;
default:
diff --git a/indexer/feature_visibility.cpp b/indexer/feature_visibility.cpp
index 327f8453f5..ee96d55a33 100644
--- a/indexer/feature_visibility.cpp
+++ b/indexer/feature_visibility.cpp
@@ -387,6 +387,20 @@ bool IsHighway(vector<uint32_t> const & types)
return false;
}
+/*
+bool IsJunction(vector<uint32_t> const & types)
+{
+ char const * arr[] = { "highway", "motorway_junction" };
+ static const uint32_t type = classif().GetTypeByPath(vector<string>(arr, arr + 2));
+
+ for (size_t i = 0; i < types.size(); ++i)
+ if (types[i] == type)
+ return true;
+
+ return false;
+}
+*/
+
bool UsePopulationRank(uint32_t type)
{
class CheckerT
diff --git a/indexer/feature_visibility.hpp b/indexer/feature_visibility.hpp
index 89344bd582..b4ba4c5f77 100644
--- a/indexer/feature_visibility.hpp
+++ b/indexer/feature_visibility.hpp
@@ -44,6 +44,7 @@ namespace feature
vector<drule::Key> & keys, string & names);
bool IsHighway(vector<uint32_t> const & types);
+ //bool IsJunction(vector<uint32_t> const & types);
bool UsePopulationRank(uint32_t type);