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

Method writeView

io/GDALWriter.cpp:251–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249
250
251void GDALWriter::writeView(const PointViewPtr view)
252{
253 m_expandByPoint = false;
254
255 // When we're running in standard mode, it's better to get the bounds and
256 // expand once, rather than have to do this for every point, since an
257 // expansion causes data to move.
258 if (!m_fixedGrid)
259 {
260 BOX2D bounds;
261 view->calculateBounds(bounds);
262 // If the view has no points, skip to avoid an error in createGrid
263 if (!bounds.valid())
264 return;
265 else if (!m_grid)
266 createGrid(bounds);
267 else
268 {
269 m_grid->expandToInclude(bounds.minx, bounds.miny);
270 m_grid->expandToInclude(bounds.maxx, bounds.maxy);
271 }
272 }
273
274 PointRef point(*view, 0);
275 for (PointId idx = 0; idx < view->size(); ++idx)
276 {
277 point.setPointId(idx);
278 processOne(point);
279 }
280}
281
282
283bool GDALWriter::processOne(PointRef& point)

Callers

nothing calls this directly

Calls 6

processOneFunction · 0.85
calculateBoundsMethod · 0.80
setPointIdMethod · 0.80
validMethod · 0.45
expandToIncludeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected