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

Method processOne

io/TextReader.cpp:278–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276
277
278bool TextReader::processOne(PointRef& point)
279{
280 if (!fillFields())
281 return false;
282
283 double d;
284 for (size_t i = 0; i < m_fields.size(); ++i)
285 {
286 if (!Utils::fromString(m_fields[i], d))
287 {
288 log()->get(LogLevel::Error) << "Can't convert "
289 "field '" << m_fields[i] << "' to numeric value on line " <<
290 m_line << " in '" << m_filename << "'. Setting to 0." <<
291 std::endl;
292 d = 0;
293 }
294 point.setField(m_dims[i], d);
295 }
296 return true;
297}
298
299
300bool TextReader::fillFields()

Callers

nothing calls this directly

Calls 5

fromStringFunction · 0.70
logFunction · 0.50
sizeMethod · 0.45
getMethod · 0.45
setFieldMethod · 0.45

Tested by

no test coverage detected