| 105 | GeomType GetGeomType() { return m_feature->GetGeomType(); } |
| 106 | |
| 107 | bp::list GetGeometry() |
| 108 | { |
| 109 | bp::list geometry; |
| 110 | switch (m_feature->GetGeomType()) |
| 111 | { |
| 112 | case GeomType::Point: |
| 113 | case GeomType::Line: |
| 114 | { |
| 115 | m_feature->ForEachPoint([&](auto const & p) { geometry.append(p); }, FeatureType::BEST_GEOMETRY); |
| 116 | } |
| 117 | break; |
| 118 | case GeomType::Area: |
| 119 | { |
| 120 | m_feature->ForEachTriangle([&](auto const & p1, auto const & p2, auto const & p3) |
| 121 | { geometry.append(m2::TriangleD(p1, p2, p3)); }, FeatureType::BEST_GEOMETRY); |
| 122 | } |
| 123 | break; |
| 124 | case GeomType::Undefined: break; |
| 125 | default: UNREACHABLE(); |
| 126 | } |
| 127 | |
| 128 | return geometry; |
| 129 | } |
| 130 | |
| 131 | m2::PointD GetCenter() { return feature::GetCenter(*m_feature); } |
| 132 | |