You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Add the following test to s2polygonbuilder_test.cc:
TEST(S2PolygonBuilder, Basic) {
std::vector<uint64> cell_ids({1152921504606846976ULL,
3458764513820540928ULL,
5764607523034234880ULL,
8070450532247928832ULL,
10376293541461622784ULL,
12682136550675316736ULL});
S2PolygonBuilder builder(S2PolygonBuilderOptions::DIRECTED_XOR());
for (uint64 val : cell_ids) {
S2Loop cell_loop{S2Cell(S2CellId(val))};
builder.AddLoop(&cell_loop);
}
S2Polygon polygon;
ASSERT_TRUE(builder.AssemblePolygon(&polygon, NULL));
ASSERT_GT(polygon.num_loops(), 0); // <- fails here
}
The test fails though at it should pass since those s2cells have boundary.
it seems that the builder does not handle properly the adding of edges.
Original issue reported on code.google.com by [email protected] on 20 May 2013 at 6:31
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 20 May 2013 at 6:31The text was updated successfully, but these errors were encountered: