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>2015-08-19 16:58:20 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:03:08 +0300
commitcc4562035c7da5f61c3f82d9a3414deb225f3d6b (patch)
treea2049a48977b202a7aaa4ed5e6da3089f961d480 /indexer/feature_data.cpp
parentf80125b9d0829b83636806621475aa0c147e1d72 (diff)
[generator] Process railway-station-subway for some special cities.
Diffstat (limited to 'indexer/feature_data.cpp')
-rw-r--r--indexer/feature_data.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indexer/feature_data.cpp b/indexer/feature_data.cpp
index 1ab7c98018..408dd381ab 100644
--- a/indexer/feature_data.cpp
+++ b/indexer/feature_data.cpp
@@ -280,6 +280,25 @@ uint8_t FeatureParams::GetTypeMask() const
return m_geomType;
}
+void FeatureParams::SetRwStationType(char const * cityName)
+{
+ Classificator const & c = classif();
+
+ static uint32_t const src = c.GetTypeByPath({"railway", "station", "subway"});
+ uint32_t const dest = c.GetTypeByPath({"railway", "station", "subway", cityName});
+
+ for (size_t i = 0; i < m_Types.size(); ++i)
+ {
+ uint32_t t = m_Types[i];
+ ftype::TruncValue(t, 3);
+ if (t == src)
+ {
+ m_Types[i] = dest;
+ break;
+ }
+ }
+}
+
void FeatureParams::AddTypes(FeatureParams const & rhs, uint32_t skipType2)
{
if (skipType2 == 0)