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

Function TEST

test/unit/filters/HexbinFilterTest.cpp:67–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67TEST(HexbinFilterTest, HexbinFilterTest_test_1)
68{
69 StageFactory f;
70
71 Options options;
72 options.add("filename", Support::datapath("las/hextest.las"));
73
74 Stage* reader(f.createStage("readers.las"));
75 EXPECT_TRUE(reader);
76 reader->setOptions(options);
77
78 Stage* hexbin(f.createStage("filters.hexbin"));
79
80 Options hexOptions;
81 hexOptions.add("output_tesselation", true);
82 hexOptions.add("sample_size", 5000);
83 hexOptions.add("threshold", 1);
84 hexOptions.add("edge_length", 0.666666666);
85 EXPECT_TRUE(hexbin);
86 hexbin->setOptions(hexOptions);
87 hexbin->setInput(*reader);
88
89 PointTable table;
90
91 hexbin->prepare(table);
92 hexbin->execute(table);
93
94 MetadataNode m = table.metadata();
95 m = m.findChild(hexbin->getName());
96
97 std::string filename = Support::temppath("hexbin.txt");
98 std::ofstream out(filename);
99 printChildren(out, m);
100 out.close();
101 FileUtils::deleteFile(filename);
102}
103
104// testing sample size for calculating grid size
105TEST(HexbinFilterTest, HexbinFilterTest_test_2)

Callers

nothing calls this directly

Calls 15

datapathFunction · 0.85
temppathFunction · 0.85
printChildrenFunction · 0.85
deleteFileFunction · 0.85
createStageMethod · 0.80
setOptionsMethod · 0.80
gridMethod · 0.80
setHexesMethod · 0.80
findShapesMethod · 0.80
findParentPathsMethod · 0.80
sortPathsMethod · 0.80
strMethod · 0.80

Tested by

no test coverage detected