forked from organicmaps/organicmaps
Removing check in case of osm id is mapped to two or more features.
This commit is contained in:
parent
26262c4ba4
commit
6add27c96a
1 changed files with 12 additions and 3 deletions
|
@ -186,9 +186,18 @@ void DeserializerFromJson::operator()(FeatureIdentifiers & id, char const * name
|
|||
auto const it = m_osmIdToFeatureIds.find(osmId);
|
||||
if (it != m_osmIdToFeatureIds.cend())
|
||||
{
|
||||
CHECK_EQUAL(it->second.size(), 1, ("Osm id:", osmId, "(encoded", osmId.EncodedId(),
|
||||
") from transit graph corresponds to", it->second.size(), "features."
|
||||
"But osm id should be represented be one feature."));
|
||||
CHECK_GREATER_OR_EQUAL(it->second.size(), 1,
|
||||
("Osm id:", osmId, "(encoded", osmId.EncodedId(),
|
||||
") from transit graph corresponds to", it->second.size(),
|
||||
"features."
|
||||
"But osm id should be represented be one feature."));
|
||||
if (it->second.size() != 1)
|
||||
{
|
||||
// Note. |osmId| corresponds several feature ids. It may happen in case of stops;
|
||||
// if a stop is present as relation. It's a rare case.
|
||||
LOG(LWARNING, ("Osm id:", osmId, "(encoded", osmId.EncodedId(), "corresponds to",
|
||||
it->second.size(), "feature ids."));
|
||||
}
|
||||
id.SetFeatureId(it->second[0]);
|
||||
}
|
||||
id.SetOsmId(osmId.EncodedId());
|
||||
|
|
Loading…
Add table
Reference in a new issue