MCPcopy Create free account
hub / github.com/PDAL/PDAL / TEST

Function TEST

test/unit/apps/TIndexTest.cpp:47–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45using namespace pdal;
46
47TEST(TIndex, test1)
48{
49 std::string inSpec(Support::datapath("tindex/*.txt"));
50 std::string outSpec(Support::temppath("tindex.json"));
51 std::string outPoints(Support::temppath("points.txt"));
52
53 std::string cmd = Support::binpath("pdal") + " tindex create " +
54 outSpec + " \"" + inSpec + "\" -f GeoJSON --log=stdout";
55
56 FileUtils::deleteFile(outSpec);
57
58 std::string output;
59 Utils::run_shell_command(cmd, output);
60
61 cmd = Support::binpath("pdal") + " --verbose=info tindex merge " +
62 outSpec + " " + outPoints + " --log=stdout "
63 "--bounds=\"([1.25, 3],[1.25, 3])\"";
64
65 FileUtils::deleteFile(outPoints);
66 Utils::run_shell_command(cmd, output);
67 std::string::size_type pos = output.find("Merge filecount: 3");
68 EXPECT_NE(pos, std::string::npos);
69
70 cmd = Support::binpath("pdal") + " --verbose=info tindex merge " +
71 outSpec + " " + outPoints + " --log=stdout "
72 "--bounds=\"([1.25, 2],[1.25, 2])\"";
73 FileUtils::deleteFile(outPoints);
74 Utils::run_shell_command(cmd, output);
75 pos = output.find("Merge filecount: 2");
76 EXPECT_NE(pos, std::string::npos);
77
78 cmd = Support::binpath("pdal") + " --verbose=info tindex merge " +
79 outSpec + " " + outPoints + " --log=stdout "
80 "--bounds=\"([1.25, 1.75],[1.25, 1.75])\"";
81 FileUtils::deleteFile(outPoints);
82 Utils::run_shell_command(cmd, output);
83 pos = output.find("Merge filecount: 1");
84 EXPECT_NE(pos, std::string::npos);
85
86 FileUtils::deleteFile(outPoints);
87 FileUtils::deleteFile(outSpec);
88}
89
90TEST(TIndex, test2)
91{

Callers

nothing calls this directly

Calls 8

datapathFunction · 0.85
temppathFunction · 0.85
binpathFunction · 0.85
deleteFileFunction · 0.85
getGeometryFunction · 0.85
deleteDirectoryFunction · 0.85
areaMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected