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

Howard Butler howard at hobu.co
Thu Apr 20 09:07:25 PDT 2017


The readers.icebridge driver is already using HDF5. The problem is every HDF5 file is potentially a different layout/schema, and coming up with a way to define those things might be tough.

 
> On Apr 20, 2017, at 10:59 AM, Michael Rosen <michael.rosen at gmail.com> wrote:
> 
> Thanks for the explanation. One  alternative might be to add an HDF reader / writer.   Thoughts on the feasibility of this?  Thoughts on using the official HDF library vs leveraging the implementation in GDAL (which I assume is different) ?
> On Thu, Apr 20, 2017 at 7:52 AM Howard Butler <howard at hobu.co <mailto:howard at hobu.co>> wrote:
> 
>> On Apr 19, 2017, at 6:29 PM, Michael Rosen <michael.rosen at gmail.com <mailto: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/a801b3e1/attachment-0001.html>


More information about the pdal mailing list