[pdal] Feedback on driver development

Edgar Ellis edgar.ellis at caris.com
Mon Apr 2 18:51:31 EDT 2012


Hi All,

I recently wrote a (read-only) PDAL driver using the plugin API for our 
proprietary format. MPG was interested in some feedback, and it seemed 
appropriate for the mailing list.

* Documentation
I didn't find the limited documentation to be a problem, for the most 
part the source was easy to follow. A couple areas that required some 
digging:
- How should a driver create UUIDs? (How unique are they)
- Consistency of the Schema in Iterators. Is the PointBuffer passed to 
the Iterator guaranteed to have the same schema as the Reader?
- (Un)SignedByte seems to duplicate (Un)SignedInteger with a size of 1. 
Easy enough to handle, but is there a preferred form?

* Converting between formats
To get pc2pc to convert from our format to las I had to make sure I 
exposed the position as "X", "Y", and "Z" dimensions as ints, instead of 
the natively stored doubles. If we add write support this would mean we 
wouldn't get an exact copy.
Similarly I suspect there's going to be a need for users to map 
dimensions (eg write source dimension foo into destination dimension bar).
Our format isn't interleaved (it's banded/column major), there would be 
some performance benefit if we only had to read dimensions that the 
Writer was using. Not a major concern.

It would be nice if file based plugins could be used directly with 
pcinfo/pc2pc without an xml pipeline file.

getField() looks dangerous, sometimes it will convert the types, but for 
others will give you corrupt data. Also, its behavior differs from 
setField. I have an idea for a patch if there's interest in making this 
more robust.


But all in all development went smoothly; Many thanks for adding the 
plugin support.

- Edgar Ellis


More information about the pdal mailing list