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

Method readBlock

io/GDALReader.cpp:216–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216bool GDALReader::BlockReader::readBlock()
217{
218 m_needsRead = false;
219 if (m_blockRow >= m_numBlocksY)
220 {
221 return false; // done
222 }
223
224 m_currentBlock.m_blockCol = m_blockCol;
225 m_currentBlock.m_blockRow = m_blockRow;
226 m_currentBlock.m_data.resize(m_reader.m_raster->bandCount());
227
228 int readCol = m_blockCol * m_blockWidth;
229 int readRow = m_blockRow * m_blockHeight;
230
231 for (int band = 0; band < m_reader.m_raster->bandCount(); ++band)
232 {
233 if (m_reader.m_raster->read(
234 band, readCol, readRow, m_blockWidth, m_blockHeight,
235 m_currentBlock.m_data.at(band)) != gdal::GDALError::None)
236 {
237 return false;
238 }
239 }
240
241 m_blockCol++;
242 if (m_blockCol >= m_numBlocksX)
243 {
244 m_blockCol = 0;
245 m_blockRow++;
246 }
247
248 return true;
249}
250
251point_count_t GDALReader::BlockReader::processBlock(PointViewPtr view)
252{

Callers

nothing calls this directly

Calls 3

resizeMethod · 0.80
atMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected