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

Method CollectFeature

generator/collector_camera.cpp:170–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void CameraCollector::CollectFeature(feature::FeatureBuilder const & fb, OsmElement const & element)
171{
172 if (element.m_type == OsmElement::EntityType::Node)
173 {
174 if (ftypes::IsSpeedCamChecker::Instance()(fb.GetTypes()))
175 m_speedCameras.emplace(element.m_id, element);
176 }
177 else if (element.m_type == OsmElement::EntityType::Way)
178 {
179 if (fb.IsLine() && routing::IsCarRoad(fb.GetTypes()))
180 m_roadOsmIDs.push_back(element.m_id);
181 }
182}
183
184} // namespace routing_builder

Callers 7

EmitMethod · 0.45
UNIT_TESTFunction · 0.45
AddOsmWayByPointsFunction · 0.45
UNIT_CLASS_TESTFunction · 0.45
UNIT_TESTFunction · 0.45
AddWayMethod · 0.45
AddNodeMethod · 0.45

Calls 5

IsCarRoadFunction · 0.85
IsLineMethod · 0.80
GetTypesMethod · 0.45
emplaceMethod · 0.45
push_backMethod · 0.45

Tested by 6

UNIT_TESTFunction · 0.36
AddOsmWayByPointsFunction · 0.36
UNIT_CLASS_TESTFunction · 0.36
UNIT_TESTFunction · 0.36
AddWayMethod · 0.36
AddNodeMethod · 0.36