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

Function TEST

plugins/nitf/test/NitfWriterTest.cpp:118–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116} // Unnamed namespace
117
118TEST(NitfWriterTest, test1)
119{
120 StageFactory f;
121
122 const std::string las_input(Support::datapath("las/1.2-with-color.las"));
123 const std::string nitf_output(Support::temppath("temp_nitf.ntf"));
124
125 FileUtils::deleteFile(nitf_output);
126
127 //
128 // write the NITF
129 //
130 {
131 Options reader_opts;
132 Option reader_opt1("filename", las_input);
133 reader_opts.add(reader_opt1);
134
135 Options writer_opts;
136 Option writer_opt1("filename", nitf_output);
137 Option debug("debug", true);
138 Option verbose("verbose", 8);
139
140 Option datetime("idatim", "20110516183337");
141 writer_opts.add(datetime);
142
143 Option cls("fsclas", "S");
144 writer_opts.add(cls);
145
146 Option phone("ophone", "5155554628");
147 writer_opts.add(phone);
148
149 Option name("oname", "Howard Butler");
150 writer_opts.add(name);
151
152 Option ftitle("ftitle", "LiDAR from somewhere");
153 writer_opts.add(ftitle);
154
155 // writer_opts.add(debug);
156 // writer_opts.add(verbose);
157 writer_opts.add(writer_opt1);
158
159 Stage* reader(f.createStage("readers.las"));
160 EXPECT_TRUE(reader);
161 reader->setOptions(reader_opts);
162
163 Stage* writer(f.createStage("writers.nitf"));
164 EXPECT_TRUE(writer);
165 writer->setOptions(writer_opts);
166 writer->setInput(*reader);
167 {
168 // writer.setCompressed(false);
169 // // writer.setDate(0, 0);
170 // // writer.setPointFormat(::drivers::las::PointFormat3);
171 // // writer.setSystemIdentifier("");
172 // writer.setGeneratingSoftware("PDAL-NITF");
173 // writer.setChunkSize(100);
174 }
175 PointTable table;

Callers

nothing calls this directly

Calls 14

datapathFunction · 0.85
temppathFunction · 0.85
deleteFileFunction · 0.85
compare_contentsFunction · 0.85
createStageMethod · 0.80
setOptionsMethod · 0.80
appendPointMethod · 0.80
fileExistsFunction · 0.50
addMethod · 0.45
prepareMethod · 0.45
executeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected