[pdal] How to get the metadata of a file?

Peder Axensten Peder.Axensten at slu.se
Thu Sep 10 06:43:30 PDT 2020


I want to implement a writer that takes a point cloud file and rasterises it (percentiles and other statistics):
class Raster_metrics : public pdal::Writer;

My understanding from the documentation is that I should setup things in
void Raster_metrics::ready( pdal::PointTableRef table );
Correct?
To do that I need to access the header data of the input file, specifically its bounding box.
How do I get the input file’s bounding box from table?
And other file metadata?

Further I should process the actual points in
void Raster_metrics::write( pdal::PointViewPtr view ) — for chunks of points.
Correct?
I want to be able to process points also in a serialised manner – in what member function should I do that?

And finally I should calculate the statistics and output the these as rasters [using gdal] in
void Raster_metrics::done( pdal::PointTableRef table )
Correct?

I’ve been reading through the documentation on pdal.io, but I find it a bit scant – is there more detailed documentation somewhere?
(I.e. https://pdal.io/api/cpp/metadata.html is just a list of member functions.)

Best regards,

Peder Axensten
Research engineer

Remote Sensing
Department of Forest Resource Management
Swedish University of Agricultural Sciences
SE-901 83 Umeå
Visiting address: Skogsmarksgränd
Phone: +46 90 786 85 00
peder.axensten at slu.se, www.slu.se/srh

The Department of Forest Resource Management is environmentally certified in accordance with ISO 14001.

---
När du skickar e-post till SLU så innebär detta att SLU behandlar dina personuppgifter. För att läsa mer om hur detta går till, klicka här <https://www.slu.se/om-slu/kontakta-slu/personuppgifter/>
E-mailing SLU will result in SLU processing your personal data. For more information on how this is done, click here <https://www.slu.se/en/about-slu/contact-slu/personal-data/>


More information about the pdal mailing list