[pdal] write an in-memory array of points to a writer ... using Python bindings

Howard Butler howard at hobu.co
Thu Apr 20 07:51:58 PDT 2017


> On Apr 19, 2017, at 6:29 PM, Michael Rosen <michael.rosen at gmail.com> wrote:
> 
> Can we use the Python Bindings to create a LAS file from values we hold in Memory?  In my case, I'm using the HDF Python library to read a .h5 file and need to convert the results to LAS.
> 
> In the Writing with PDAL documentation <https://www.pdal.io/tutorial/writing.html#writing>, Bradley Chambers shows how to do this in C++ ... but it looks like we're missing some machinery to do it via Python.
> 
> In the test for the Python Bindings <https://github.com/PDAL/PDAL/blob/master/python/test/test_pipeline.py>, we see how to write the output from a filter to an array ... but not the other way around.

Not at this time, but it's been on my queue for Python stuff. I filed a ticket at https://github.com/PDAL/PDAL/issues/1573 <https://github.com/PDAL/PDAL/issues/1573> on the topic.

Part of the reason it isn't done yet is I haven't been sure how it would work. There's a few challenges

- We aren't going to do IPC, so the only way it could be used is in Python extension scenarios https://pypi.python.org/pypi/pdal <https://pypi.python.org/pypi/pdal> . 
- PDAL has explicitly named dimensions https://www.pdal.io/dimensions.html <https://www.pdal.io/dimensions.html> and Numpy has array names. The user is going to have to map their arrays to known PDAL names or things will be quite mushy, especially when translating to other formats.
- Unsure what to do about multiple arrays at once, but I presume we'll just disallow it for starters
- Metadata, SRS, and  construction and assignment 

None of this is too difficult, but there's still a significant effort required to complete it.

Howard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20170420/f31d9ab2/attachment.html>


More information about the pdal mailing list