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

Function TEST

test/unit/io/EptAddonWriterTest.cpp:55–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55TEST(EptAddonWriterTest, fullLoop)
56{
57 // Test the writing, and subsequent reading, of EPT addons from both
58 // well-known and proprietary dimensions.
59 const std::string addonDir(Support::datapath("ept/addon/"));
60 FileUtils::deleteDirectory(addonDir);
61
62 // First write the output.
63 {
64 EptReader reader;
65 {
66 Options o;
67 o.add("filename", eptLaszipPath);
68 reader.setOptions(o);
69 }
70
71 // Assign Classification values.
72 AssignFilter assign1;
73 {
74 Options o;
75 o.add("assignment", "Classification[:]=42");
76 assign1.setOptions(o);
77 assign1.setInput(reader);
78 }
79
80 // Ferry Classification => Other to create a new dimension that we can
81 // access in the next step.
82 FerryFilter ferry;
83 {
84 Options o;
85 o.add("dimensions", "Classification => Other");
86 ferry.setOptions(o);
87 ferry.setInput(assign1);
88 }
89
90 // Assign proprietary dimension values.
91 AssignFilter assign2;
92 {
93 Options o;
94 o.add("assignment", "Other[:]=88");
95 assign2.setOptions(o);
96 assign2.setInput(ferry);
97 }
98
99 EptAddonWriter writer;
100 {
101 NL::json addons;
102 addons[addonDir + "class"] = "Classification";
103 addons[addonDir + "other"] = "Other";
104
105 Options o;
106 o.add("addons", addons);
107 writer.setOptions(o);
108 writer.setInput(assign2);
109 }
110
111 PointTable table;
112 writer.prepare(table);

Callers

nothing calls this directly

Calls 9

datapathFunction · 0.85
deleteDirectoryFunction · 0.85
setOptionsMethod · 0.80
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45
findDimMethod · 0.45
sizeMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected