| 302 | } |
| 303 | |
| 304 | void 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 | |
| 335 | m2::PointD FeatureType::GetCenter() |
| 336 | { |
nothing calls this directly
no test coverage detected