Skip to content

Commit

Permalink
Fix index/coords issues.
Browse files Browse the repository at this point in the history
Close #2596
  • Loading branch information
abellgithub committed Jul 3, 2019
1 parent 9cb932b commit 9746301
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/tiledb/io/TileDBWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ void TileDBWriter::ready(pdal::BasePointTable &table)
m_array.reset(new tiledb::Array(*m_ctx, m_arrayName, TILEDB_WRITE));
m_query.reset(new tiledb::Query(*m_ctx, *m_array));
m_query->set_layout(TILEDB_UNORDERED);
m_current_idx = 0;
}


Expand All @@ -262,7 +263,7 @@ bool TileDBWriter::processOne(PointRef& point)
double z = point.getFieldAs<double>(Dimension::Id::Z);

for (auto& a : m_attrs)
writeAttributeValue(a, point, m_cache_size);
writeAttributeValue(a, point, m_current_idx);

m_coords.push_back(x);
m_coords.push_back(y);
Expand Down Expand Up @@ -409,6 +410,7 @@ bool TileDBWriter::flushCache(size_t size)
}

m_current_idx = 0;
m_coords.clear();

if (status == tiledb::Query::Status::FAILED)
return false;
Expand Down

0 comments on commit 9746301

Please sign in to comment.