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

Method IsValid

generator/feature_builder.cpp:729–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

727}
728
729bool FeatureBuilder::IsValid() const
730{
731 if (!GetParams().IsValid())
732 return false;
733
734 auto const & geom = GetGeometry();
735 if (IsLine() && (geom.empty() || GetOuterGeometry().size() < 2))
736 return false;
737
738 if (IsArea())
739 {
740 if (geom.empty())
741 return false;
742
743 for (auto const & points : geom)
744 if (points.size() < 3)
745 return false;
746 }
747
748 return true;
749}
750
751std::string DebugPrint(FeatureBuilder const & fb)
752{

Callers 15

ReadRoadAccessFunction · 0.45
PreSerializeMethod · 0.45
IsAcceptedMethod · 0.45
AddSpeedMethod · 0.45
AddElementToCacheFunction · 0.45
LoadBordersFunction · 0.45
CreatePlaceMethod · 0.45
ReadFeaturesFunction · 0.45
TestValidMethod · 0.45
DebugPrintFunction · 0.45

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by 2

TestValidMethod · 0.36
UNIT_CLASS_TESTFunction · 0.36