| 485 | } |
| 486 | |
| 487 | void FeatureBuilder::DeserializeAccuratelyFromIntermediate(Buffer & data) |
| 488 | { |
| 489 | ArrayByteSource source(&data[0]); |
| 490 | m_params.Read(source); |
| 491 | |
| 492 | m_limitRect.MakeEmpty(); |
| 493 | |
| 494 | if (IsPoint()) |
| 495 | { |
| 496 | rw::ReadPOD(source, m_center); |
| 497 | m_limitRect.Add(m_center); |
| 498 | } |
| 499 | else |
| 500 | { |
| 501 | uint32_t const count = ReadVarUint<uint32_t>(source); |
| 502 | ASSERT_GREATER(count, 0, (*this)); |
| 503 | m_polygons.resize(count); |
| 504 | |
| 505 | for (auto & poly : m_polygons) |
| 506 | { |
| 507 | poly.clear(); |
| 508 | rw::ReadVectorOfPOD(source, poly); |
| 509 | CalcRect(poly, m_limitRect); |
| 510 | } |
| 511 | |
| 512 | m_coastCell = ReadVarInt<int64_t>(source); |
| 513 | } |
| 514 | |
| 515 | rw::ReadVectorOfPOD(source, m_osmIds); |
| 516 | |
| 517 | CHECK(IsValid(), (*this)); |
| 518 | } |
| 519 | |
| 520 | void FeatureBuilder::AddOsmId(base::GeoObjectId id) |
| 521 | { |