[pdal] Allowing selection of PDAL shared readers by file extension?

Ben Southall ben.southall at sri.com
Wed Sep 2 09:46:57 PDT 2020


Hello,

I'm writing a PDAL Reader plugin for a custom file type. If I write it as a static plugin, I know I can specify file extensions in StaticPluginInfo to allow PDAL to figure out when to use the reader. But then I have to rebuild all of PDAL to use the reader. Is there some runtime option (or other configuration step, aside from recompilation) that would allow me to tell PDAL to use a custom reader for certain file types? I know that for a single-input application, one can use -r readers.my_custom_reader, if I'd like to be able to load my custom data to a pipeline with mixed input types, or into a kernel (such as pdal delta) that takes two inputs.

Let's say I've got a .custom_ext dataset and .las dataset I'd like to run through pdal delta. It would appear that  I'm out of luck - if I use -r readers.my_custom_reader, then I think that my_custom_reader will be used for both inputs, so the .las dataset won't load. If I allow for automatic selection of reader type, then clearly it fails for my .custom_ext file, since the code that infers reader from file extension doesn't know about my dynamic reader.

To get pdal delta working, I'm currently writing a version that overloads the dataset loading code so that I can check for .custom_ext before attempting the usual driver inference process. But it would be nice to be able to tell PDAL about my fancy custom reader without having to do this (or without having to recompile PDAL to include my reader statically).

Best,

Ben
SRI email will be unavailable starting at 6 PM PDT, September 4, 2020. Email messages will be queued until email resumes on September 6, 2020.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20200902/004daa4d/attachment.html>


More information about the pdal mailing list