| 44 | using namespace pdal; |
| 45 | |
| 46 | void checkFile(int i, int j, int lines, double xoff = 0, double yoff = 0) |
| 47 | { |
| 48 | std::string header; |
| 49 | std::string t(Support::temppath("tile/out" + |
| 50 | std::to_string(i) + "_" + std::to_string(j) + ".txt")); |
| 51 | Utils::ClassicLocaleStream<std::ifstream> in(t); |
| 52 | std::getline(in, header); |
| 53 | |
| 54 | int count = 0; |
| 55 | while (in) |
| 56 | { |
| 57 | char c; |
| 58 | double x, y, z; |
| 59 | |
| 60 | in >> x >> c >> y >> c >> z; |
| 61 | if (!in.good()) break; |
| 62 | EXPECT_GE(x, xoff + (i * 10)); |
| 63 | EXPECT_LT(x, xoff + ((i + 1) * 10)); |
| 64 | EXPECT_GE(y, yoff + (j * 10)); |
| 65 | EXPECT_LT(y, yoff + ((j + 1) * 10)); |
| 66 | count++; |
| 67 | } |
| 68 | EXPECT_EQ(count, lines); |
| 69 | } |
| 70 | |
| 71 | TEST(Tile, test1) |
| 72 | { |