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

Function extractInputs

pdal/PipelineReaderJSON.cpp:208–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208std::vector<Stage *> extractInputs(NL::json& node, TagMap& tags)
209{
210 std::vector<Stage *> inputs;
211 std::string filename;
212
213 auto it = node.find("inputs");
214 if (it != node.end())
215 {
216 NL::json& val = *it;
217 if (val.is_string())
218 handleInputTag(val.get<std::string>(), tags, inputs);
219 else if (val.is_array())
220 {
221 for (auto& input : val)
222 {
223 if (!input.is_string())
224 throw pdal_error("JSON pipeline: 'inputs' tag must "
225 " be specified as a string or array of strings.");
226 handleInputTag(input.get<std::string>(), tags, inputs);
227 }
228 }
229 else
230 throw pdal_error("JSON pipeline: 'inputs' tag must "
231 " be specified as a string or array of strings.");
232 node.erase(it);
233 }
234 return inputs;
235}
236
237Options extractOptions(NL::json& node)
238{

Callers 1

parsePipelineFunction · 0.85

Calls 4

handleInputTagFunction · 0.85
findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected