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

Method AddRelation

generator/intermediate_data.cpp:430–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428{}
429
430void IntermediateDataWriter::AddRelation(Key id, RelationElement const & e)
431{
432 static std::set<std::string_view> const types = {"multipolygon", "route", "boundary",
433 "associatedStreet", "building", "restriction"};
434 auto const relationType = e.GetType();
435 if (!types.count(relationType))
436 return;
437
438 m_relations.Write(id, e);
439 AddToIndex(m_nodeToRelations, id, e.m_nodes);
440 AddToIndex(m_wayToRelations, id, e.m_ways);
441 AddToIndex(m_relationToRelations, id, e.m_relations);
442}
443
444void IntermediateDataWriter::SaveIndex()
445{

Callers 1

AddElementToCacheFunction · 0.80

Calls 4

AddToIndexFunction · 0.85
GetTypeMethod · 0.45
countMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected