RuntimeError: TileDB Hilbert Ordering - domain extent

Hello, I am writing to Tiledb using the pdal pipeline as mentioned here ‘PDAL - TileDB Geospatial’ (Almost the same JSON format). But on executing, I get ‘RuntimeError: writers.tiledb: Using TileDB Hilbert ordering, must specify a domain extent or execute a prior stats filter stage’. I am using pdal version 2.4.2 . Although, I don’t get the error when I pass ‘x_tile_size’, ‘y_tile_size’, ‘z_tile_size’ in the json(even if I pass the values to be 1), these are optional parameters as specified here ‘writers.tiledb —’. I had earlier used the Writiers without specifying the tile sizes and it had worked fine. The issues seems to be because of recent changes (maybe to pdal tiledbwriters?). Could you please help understand and resolve this issue?
Thank you.

For using Hilbert ordering, the writer needs to know the extent of the full array before schema creation. To do this using pdal you can either run filters.stats inline before the writer ( 'type' : 'filters.stats'), or you can specify the domain starts and ends.

The below example has minx (and the other variables) set to the value representing min and max of that axis (you can get this info from Pdal info bounding box, or a few other methods).:


This is only the case for creating a new array, if the array is already created and you are appending points, you do not need to specify this. Also while TileDB supports setting “infinite bounds”, that is not recommended with Hilbert ordering, as if the extent of the domain is much larger than the extent of actual data, the tiling will not be performant.

For more info on PDAL stats filter: