MCPcopy Create free account
hub / github.com/comaps/comaps / GetMostGenericOsmId

Method GetMostGenericOsmId

generator/feature_builder.cpp:542–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542base::GeoObjectId FeatureBuilder::GetMostGenericOsmId() const
543{
544 if (m_osmIds.empty())
545 return base::GeoObjectId();
546
547 auto result = m_osmIds.front();
548 for (auto const & id : m_osmIds)
549 {
550 auto const t = id.GetType();
551 if (t == base::GeoObjectId::Type::ObsoleteOsmRelation)
552 {
553 result = id;
554 break;
555 }
556 else if (t == base::GeoObjectId::Type::ObsoleteOsmWay &&
557 result.GetType() == base::GeoObjectId::Type::ObsoleteOsmNode)
558 {
559 result = id;
560 }
561 }
562 return result;
563}
564
565std::string FeatureBuilder::DebugPrintIDs() const
566{

Callers 15

AddSrcMethod · 0.80
MatchMethod · 0.80
HandleMethod · 0.80
AddRoadMethod · 0.80
ProcessRoundaboutsMethod · 0.80
LessFunction · 0.80
DumpOneMethod · 0.80
FilterOneMethod · 0.80
IsRoadExistsMethod · 0.80
IsWorsePlaceFunction · 0.80
ProcessPlacesMethod · 0.80
CreatePlaceMethod · 0.80

Calls 4

frontMethod · 0.80
GeoObjectIdClass · 0.70
emptyMethod · 0.45
GetTypeMethod · 0.45

Tested by 4

SortFunction · 0.64
UNIT_CLASS_TESTFunction · 0.64
UNIT_CLASS_TESTFunction · 0.64
UNIT_CLASS_TESTFunction · 0.64