| 345 | } |
| 346 | |
| 347 | bool TileDBReader::processPoint(PointRef& point) |
| 348 | { |
| 349 | if (m_offset == m_resultSize) |
| 350 | { |
| 351 | if (m_complete) |
| 352 | { |
| 353 | return false; |
| 354 | } |
| 355 | else |
| 356 | { |
| 357 | tiledb::Query::Status status; |
| 358 | |
| 359 | m_query->submit(); |
| 360 | |
| 361 | if (m_args->m_stats) |
| 362 | { |
| 363 | tiledb::Stats::dump(stdout); |
| 364 | tiledb::Stats::reset(); |
| 365 | } |
| 366 | |
| 367 | status = m_query->query_status(); |
| 368 | |
| 369 | // Get the number of elements read from the `X` dimension. |
| 370 | m_resultSize = (int)m_query->result_buffer_elements()["X"].second; |
| 371 | |
| 372 | if (status == tiledb::Query::Status::INCOMPLETE && |
| 373 | m_resultSize == 0) |
| 374 | throwError("Need to increase chunk_size for reader."); |
| 375 | |
| 376 | if (status == tiledb::Query::Status::COMPLETE) |
| 377 | m_complete = true; |
| 378 | |
| 379 | m_offset = 0; |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | if (m_resultSize > 0) |
| 384 | { |
| 385 | // Get the values read at m_offset and use to set the PDAL point values. |
| 386 | for (auto& buffer : m_dims) |
| 387 | buffer->copyDataToPoint(point, m_offset); |
| 388 | ++m_offset; |
| 389 | return true; |
| 390 | } |
| 391 | return false; |
| 392 | } |
| 393 | |
| 394 | point_count_t TileDBReader::read(PointViewPtr view, point_count_t count) |
| 395 | { |
nothing calls this directly
no test coverage detected