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

Method HierarchyPlace

generator/hierarchy.cpp:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56HierarchyPlace::HierarchyPlace(FeatureBuilder const & fb)
57 : m_id(MakeCompositeId(fb))
58 , m_name(fb.GetMultilangName())
59 , m_types(fb.GetTypes())
60 , m_rect(fb.GetLimitRect())
61 , m_center(fb.GetKeyPoint())
62{
63 if (fb.IsPoint())
64 {
65 m_isPoint = true;
66 }
67 else if (fb.IsArea())
68 {
69 m_polygon = fb.GetOuterGeometry();
70 boost::geometry::correct(m_polygon);
71 m_area = boost::geometry::area(m_polygon);
72 }
73}
74
75bool HierarchyPlace::Contains(HierarchyPlace const & smaller) const
76{

Callers

nothing calls this directly

Calls 6

MakeCompositeIdFunction · 0.85
IsAreaMethod · 0.80
GetTypesMethod · 0.45
GetLimitRectMethod · 0.45
GetKeyPointMethod · 0.45
IsPointMethod · 0.45

Tested by

no test coverage detected