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

Method GetWikidataId

generator/descriptions_section_builder.cpp:56–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56std::optional<std::string> WikidataHelper::GetWikidataId(uint32_t featureId) const
57{
58 auto const itFeatureIdToOsmId = m_featureIdToOsmId.find(featureId);
59 if (itFeatureIdToOsmId == std::end(m_featureIdToOsmId))
60 return {};
61
62 auto const osmId = itFeatureIdToOsmId->second;
63 auto const itOsmIdToWikidataId = m_osmIdToWikidataId.find(osmId);
64 return itOsmIdToWikidataId == std::end(m_osmIdToWikidataId) ? std::optional<std::string>()
65 : itOsmIdToWikidataId->second;
66}
67
68std::string DescriptionsCollectionBuilderStat::LangStatisticsToString() const
69{

Callers 2

operator()Method · 0.80
UNIT_CLASS_TESTFunction · 0.80

Calls 2

endFunction · 0.50
findMethod · 0.45

Tested by 1

UNIT_CLASS_TESTFunction · 0.64