A common questions for users of point clouds is what the spatial extent of a point cloud collection is. Files generally provide only rectangular bounds, but often the points inside the files only fill up a small percentage of the area within the bounds.
The hexbin filter reads a point stream and writes out a metadata record that contains a much tighter data bound, expressed as a well-known text polygon. In order to write out the metadata record, the pdal pipeline command must be invoked using the –pipeline-serialization option:
$ pdal hexbin-pipeline.xml --pipeline-serialization hexbin-out.xml
After running with the pipeline serialization option, the output file looks like this:
<PointView>
<Metadata name="pointbuffer" type="blank">
<Metadata name="filters.hexbin" type="blank">
<Metadata name="edge_size" type="double">
0.002218331916495204
</Metadata>
<Metadata name="threshold" type="nonNegativeInteger">
15
</Metadata>
<Metadata name="sample_size" type="nonNegativeInteger">
5000
</Metadata>
<Metadata name="boundary" type="string">
MULTIPOLYGON (((
-80.8466 35.2183, -80.8460 35.2194,
-80.8447 35.2194, -80.8441 35.2205,
-80.8428 35.2205, -80.8421 35.2216,
...
-80.8498 35.2194, -80.8486 35.2194,
-80.8479 35.2183, -80.8466 35.2183
)))
</Metadata>
</Metadata>
</Metadata>
</PointView>
In addition, if you have defined a writer you will have the usual point data output file.
<?xml version="1.0" encoding="utf-8"?>
<Pipeline version="1.0">
<Writer type="writers.las">
<Option name="filename">
file-output.las
</Option>
<Filter type="filters.hexbin">
<Option name="threshold">10</Option>
<Reader type="readers.las">
<Option name="filename">
file-input.las
</Option>
</Reader>
</Filter>
</Writer>
</Pipeline>