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

Method AddHouseNumber

libs/indexer/feature_data.cpp:344–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344bool FeatureParams::AddHouseNumber(string houseNumber)
345{
346 ASSERT(!houseNumber.empty(), ());
347
348 // Negative house numbers are not supported.
349 if (houseNumber.front() == '-' || houseNumber.find("-") == 0)
350 {
351 LOG(LWARNING, (kHNLogTag, "Negative house number:", houseNumber));
352 return false;
353 }
354
355 // Replace full-width digits, mostly in Japan, by ascii-ones.
356 strings::NormalizeDigits(houseNumber);
357
358 // Assign house number as-is to create building-address if needed.
359 // Final checks are made in FeatureBuilder::PreSerialize().
360 house.Set(houseNumber);
361 return true;
362}
363
364void FeatureParams::SetGeomType(feature::GeomType t)
365{

Callers 2

UNIT_CLASS_TESTFunction · 0.80
SerializeMethod · 0.80

Calls 6

ASSERTFunction · 0.85
NormalizeDigitsFunction · 0.85
frontMethod · 0.80
emptyMethod · 0.45
findMethod · 0.45
SetMethod · 0.45

Tested by 2

UNIT_CLASS_TESTFunction · 0.64
SerializeMethod · 0.64