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

Method getValue

plugins/hdf/io/Hdf5Handler.cpp:86–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85
86uint8_t *DimInfo::getValue(pdal::point_count_t pointIndex) {
87 if(pointIndex < chunkLowerBound || pointIndex >= chunkUpperBound) {
88 // load new chunk
89 H5::DataSpace dspace = m_dset.getSpace();
90
91 chunkLowerBound = (pointIndex / m_chunkSize) * m_chunkSize;
92 chunkUpperBound =
93 (std::min)(chunkLowerBound + m_chunkSize, m_numPoints);
94
95 hsize_t selectionSize = chunkUpperBound - chunkLowerBound;
96
97 H5::DataSpace memspace(1, &selectionSize);
98 dspace.selectHyperslab(H5S_SELECT_SET, &selectionSize, &chunkLowerBound);
99 m_dset.read(m_buffer.data(),
100 m_dset.getDataType(),
101 memspace,
102 dspace );
103
104 }
105 hsize_t pointOffsetWithinChunk = pointIndex - chunkLowerBound;
106 return m_buffer.data() + pointOffsetWithinChunk * m_size;
107}
108
109
110hsize_t Handler::getNumPoints() const

Callers 6

TESTFunction · 0.80
readMethod · 0.80
processOneMethod · 0.80
lookupAttributeFunction · 0.80
startElementMethod · 0.80
getValuesFunction · 0.80

Calls 2

readMethod · 0.45
dataMethod · 0.45

Tested by 1

TESTFunction · 0.64