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

Method ParseCommon

libs/indexer/feature.cpp:304–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304void FeatureType::ParseCommon()
305{
306 if (m_parsed.m_common)
307 return;
308
309 ParseTypes();
310
311 ArrayByteSource source(m_data.data() + m_offsets.m_common);
312 uint8_t const h = Header(m_data);
313 m_params.Read(source, h);
314
315 if (GetGeomType() == GeomType::Point)
316 {
317 uint64_t decoded = ReadVarUint<uint64_t>(source);
318
319 if (m_loadInfo->m_version >= DatSectionHeader::Version::V1)
320 {
321 m_hasRelations = (decoded & 0x1) == 1;
322 decoded >>= 1;
323 }
324
325 auto const & cp = m_loadInfo->GetDefGeometryCodingParams();
326 m_center = PointUToPointD(coding::DecodePointDeltaFromUint(decoded, cp.GetBasePoint()), cp.GetCoordBits());
327
328 m_limitRect.Add(m_center);
329 }
330
331 m_offsets.m_header2 = CalcOffset(source, m_data.data());
332 m_parsed.m_common = true;
333}
334
335m2::PointD FeatureType::GetCenter()
336{

Callers

nothing calls this directly

Calls 9

PointUToPointDFunction · 0.85
DecodePointDeltaFromUintFunction · 0.85
CalcOffsetFunction · 0.85
GetCoordBitsMethod · 0.80
HeaderFunction · 0.70
dataMethod · 0.45
ReadMethod · 0.45
GetBasePointMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected