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

Method DebugString

libs/indexer/feature.cpp:692–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690}
691
692std::string FeatureType::DebugString()
693{
694 ParseGeometryAndTriangles(FeatureType::BEST_GEOMETRY);
695
696 std::string res = DebugPrint(m_id) + " " + DebugPrint(GetGeomType());
697
698 m2::PointD keyPoint;
699 switch (GetGeomType())
700 {
701 case GeomType::Point: keyPoint = m_center; break;
702
703 case GeomType::Line:
704 if (m_points.empty())
705 break;
706 keyPoint = m_points.front();
707 break;
708
709 case GeomType::Area:
710 if (m_triangles.empty())
711 break;
712 ASSERT_GREATER(m_triangles.size(), 2, ());
713 keyPoint = (m_triangles[0] + m_triangles[1] + m_triangles[2]) / 3.0;
714 break;
715
716 case GeomType::Undefined: ASSERT(false, ()); break;
717 }
718 // Print coordinates in (lat,lon) for better investigation capabilities.
719 res += ": " + DebugPrint(keyPoint) + "; " + DebugPrint(mercator::ToLatLon(keyPoint)) + "\n";
720
721 Classificator const & c = classif();
722
723 res += "Types";
724 uint32_t const count = GetTypesCount();
725 for (size_t i = 0; i < count; ++i)
726 res += (" : " + c.GetReadableObjectName(m_types[i]));
727 res += "\n";
728
729 auto const paramsStr = m_params.DebugString();
730 if (!paramsStr.empty())
731 res += paramsStr + "\n";
732
733 return res;
734}
735
736m2::RectD FeatureType::GetLimitRect(int scale)
737{

Callers 13

MatchResultsFunction · 0.45
GetIntersectionFunction · 0.45
is_drawableMethod · 0.45
operator()Method · 0.45
operator()Method · 0.45
operator()Method · 0.45
UNIT_TESTFunction · 0.45
operator()Method · 0.45
PriorityToDepthMethod · 0.45
ProcessPointRulesMethod · 0.45
ProcessAreaRulesMethod · 0.45
ProcessKeyMethod · 0.45

Calls 7

ASSERTFunction · 0.85
frontMethod · 0.80
GetReadableObjectNameMethod · 0.80
DebugPrintFunction · 0.70
ToLatLonFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45

Tested by 6

MatchResultsFunction · 0.36
is_drawableMethod · 0.36
operator()Method · 0.36
operator()Method · 0.36
operator()Method · 0.36
UNIT_TESTFunction · 0.36