| 104 | } // namespace |
| 105 | |
| 106 | std::array<Cartographic, 4> S2CellID::getVertices() const { |
| 107 | GoogleS2CellID cell(this->_id); |
| 108 | R2Rect rect = cell.GetBoundUV(); |
| 109 | int face = cell.face(); |
| 110 | return { |
| 111 | toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(0, 0))), |
| 112 | toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(1, 0))), |
| 113 | toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(1, 1))), |
| 114 | toCartographic(S2::FaceUVtoXYZ(face, rect.GetVertex(0, 1)))}; |
| 115 | } |
| 116 | |
| 117 | S2CellID S2CellID::getParent() const { |
| 118 | return S2CellID(GoogleS2CellID(this->_id).parent().id()); |
no test coverage detected