Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Aug 6, 2021
2 parents b78b070 + 82eefc3 commit ab7f52d
Show file tree
Hide file tree
Showing 12 changed files with 470 additions and 189 deletions.
2 changes: 1 addition & 1 deletion doc/download.rst
Expand Up @@ -71,7 +71,7 @@ required dependencies and build PDAL from source.
:widths: 20, 20, 20, 20, 20, 20

"Platform(s)", "linux", "linux", "linux", "linux", "win64, mac, linux"
"PDAL version", "2.3", "", "", "2.2", "2.2"
"PDAL version", "2.3", "", "", "2.2", "2.3"
"CPD", "", "", "", "X", ""
"E57", "X", "", "", "", "X"
"HDF", "X", "", "", "", "X"
Expand Down
9 changes: 9 additions & 0 deletions doc/stages/readers.tiledb.rst
Expand Up @@ -44,6 +44,15 @@ stats
bbox3d
TileDB subarray to read in format ([minx, maxx], [miny, maxy], [minz, maxz]) [Optional]

timestamp
Opens the array at a particular TileDB timestamp [Optional]

end_timestamp
Opens the array at a particular TileDB timestamp [Optional]

start_timestamp
Opens the array between a timestamp range of start_timestamp and end_timestamp [Optional]

.. include:: reader_opts.rst

.. _TileDB: https://tiledb.io
48 changes: 35 additions & 13 deletions doc/stages/writers.tiledb.rst
Expand Up @@ -19,6 +19,9 @@ Example
"type":"readers.las",
"array_name":"input.las"
},
{
"type":"filters.stats"
},
{
"type":"writers.tiledb",
"array_name":"output_array"
Expand All @@ -39,13 +42,31 @@ tile_data_capacity
Number of points per tile [Optional]

x_tile_size
Tile size (x) in a Cartesian projection [Optional]
Tile size (x) [Optional]

y_tile_size
Tile size (y) in a Cartesian projection [Optional]
Tile size (y) [Optional]

z_tile_size
Tile size (z) in a Cartesian projection [Optional]
Tile size (z) [Optional]

x_domain_st
Domain minimum in x [Optional]

x_domain_end
Domain maximum in x [Optional]

y_domain_st
Domain minimum in y [Optional]

y_domain_end
Domain maximum in y [Optional]

z_domain_st
Domain minimum in z [Optional]

z_domain_end
Domain maximum in z [Optional]

chunk_size
Point cache size for chunked writes [Optional]
Expand All @@ -65,6 +86,9 @@ stats
filters
JSON array or object of compression filters for either `coords` or `attributes` of the form {coords/attributename : {"compression": name, compression_options: value, ...}} [Optional]

timestamp
Sets the TileDB timestamp for this write

.. include:: writer_opts.rst

By default TileDB will use the following set of compression filters for coordinates and attributes;
Expand All @@ -73,24 +97,22 @@ By default TileDB will use the following set of compression filters for coordina
{
"coords":[
{"compression": "bit-shuffle"},
{"compression": "gzip", "compression_level": 9}
{"compression": "zstd", "compression_level": 7}
],
"Intensity":{"compression": "bzip2", "compression_level": 5},
"ReturnNumber": {"compression": "zstd", "compression_level": 75},
"NumberOfReturns": {"compression": "zstd", "compression_level": 75},
"ReturnNumber": {"compression": "zstd", "compression_level": 7},
"NumberOfReturns": {"compression": "zstd", "compression_level": 7},
"ScanDirectionFlag": {"compression": "bzip2", "compression_level": 5},
"EdgeOfFlightLine": {"compression": "bzip2", "compression_level": 5},
"Classification": {"compression": "gzip", "compression_level": 9},
"ScanAngleRank": {"compression": "bzip2", "compression_level": 5},
"UserData": {"compression": "gzip", "compression_level": 9},
"PointSourceId": {"compression": "bzip2"},
"Red": {"compression": "rle"},
"Green": {"compression": "rle"},
"Blue": {"compression": "rle"},
"GpsTime": [
{"compression": "bit-shuffle"},
{"compression": "zstd", "compression_level": 75}
"Red": {"compression": "zstd", "compression_level": 7},
"Green": {{"compression": "zstd", "compression_level": 7},
"Blue": {{"compression": "zstd", "compression_level": 7},
"GpsTime": [
{"compression": "zstd", "compression_level": 7}
]
}
Expand Down
10 changes: 6 additions & 4 deletions pdal/util/Uuid.hpp
Expand Up @@ -70,14 +70,17 @@ namespace pdal
#pragma pack(1)
struct uuid
{
uuid() : time_low(0), time_mid(0), time_hi_and_version(0), clock_seq(0), node {}
{}
uuid()
{ clear(); }

uint32_t time_low;
uint16_t time_mid;
uint16_t time_hi_and_version;
uint16_t clock_seq;
uint8_t node[6];

void clear()
{ memset(this, 0, sizeof(struct uuid)); }
};
#pragma pack(pop)

Expand Down Expand Up @@ -107,8 +110,7 @@ class PDAL_DLL Uuid
{ parse(s); }

void clear()
{ memset(&m_data, 0, sizeof(m_data)); }

{ m_data.clear(); }
void unpack(const char *c)
{
BeExtractor e(c, 10);
Expand Down
25 changes: 24 additions & 1 deletion plugins/tiledb/io/TileDBReader.cpp
Expand Up @@ -105,6 +105,13 @@ void TileDBReader::addArgs(ProgramArgs& args)
args.add("stats", "Dump TileDB query stats to stdout", m_stats, false);
args.add("bbox3d", "Bounding box subarray to read from TileDB in format "
"([minx, maxx], [miny, maxy], [minz, maxz])", m_bbox);
args.add("end_timestamp", "TileDB array timestamp", m_endTimeStamp,
point_count_t(0));
args.addSynonym("end_timestamp", "timestamp");
#if TILEDB_VERSION_MAJOR > 2 || (TILEDB_VERSION_MAJOR == 2 && TILEDB_VERSION_MINOR >= 3)
args.add("start_timestamp", "TileDB array timestamp", m_startTimeStamp,
point_count_t(0));
#endif
}

void TileDBReader::prepared(PointTableRef table)
Expand All @@ -130,7 +137,23 @@ void TileDBReader::initialize()
if (m_stats)
tiledb::Stats::enable();

m_array.reset(new tiledb::Array(*m_ctx, m_filename, TILEDB_READ));
if (m_endTimeStamp)
{
#if TILEDB_VERSION_MAJOR > 2 || (TILEDB_VERSION_MAJOR == 2 && TILEDB_VERSION_MINOR >= 3)
if (m_startTimeStamp)
{
m_array.reset(new tiledb::Array(*m_ctx, m_filename, TILEDB_READ));
m_array->set_open_timestamp_start(m_startTimeStamp);
m_array->set_open_timestamp_end(m_endTimeStamp);
m_array->reopen();
}
else
#endif
m_array.reset(new tiledb::Array(*m_ctx, m_filename, TILEDB_READ, m_endTimeStamp));
}
else
m_array.reset(new tiledb::Array(*m_ctx, m_filename, TILEDB_READ));

}
catch (const tiledb::TileDBError& err)
{
Expand Down
2 changes: 2 additions & 0 deletions plugins/tiledb/io/TileDBReader.hpp
Expand Up @@ -100,6 +100,8 @@ class PDAL_DLL TileDBReader : public Reader, public Streamable
point_count_t m_chunkSize;
point_count_t m_offset;
point_count_t m_resultSize;
point_count_t m_startTimeStamp;
point_count_t m_endTimeStamp;
bool m_complete;
bool m_stats;
BOX3D m_bbox;
Expand Down

0 comments on commit ab7f52d

Please sign in to comment.