[Liblas-devel] How to use a cached reader (c++)

Helimap Postmaster postmaster at helimap.ch
Tue Mar 15 03:34:11 PDT 2016


Hello Howard,

I have a couple questions for you, regarding the pdal library. It reminds
me of ITK.

For now I won't use the pipeline-style, given that it would take a while to
refactor the ulterior processing. I will most definitely consider it,
thought.

At the moment I am looking for a read into a std::vector with either the
full las cloud or a buffered read of chunk_size size. Reading point by
point is very inefficient, more so on network drives. Looks like cached
liblas does that, but doesn't make the vector accessible. It is convenient
for me to have chunks or the full cloud given that afterwards I do the
processing for each point in a openmp for. Of course chunks is better,
given that occasionally the clouds won't fit in memory.

Getting to pdal, there isn't much documentation on the pdal c++ API, is
there? (e.g. http://www.pdal.io/api/cpp/reader.html ) What methods does the
reader class provide? Are they thread-safe? You state pdal is not
parallelized, but can I use the reader in parallel? Does it buffer, and can
I have access to the buffer?

Cheers,

Pol



On Tue, Mar 15, 2016 at 9:24 AM, Helimap Postmaster <postmaster at helimap.ch>
wrote:

> Good morning Howard,
>
> This is precious information. I was unaware on liblas being under
> revision, I'm glad you told me. I'll follow up the pointers you gave, they
> look promising.
>
> Thank you again,
>
> Pol
>
> On Mon, Mar 14, 2016 at 8:29 PM, Howard Butler <howard at hobu.co> wrote:
>
>>
>> > On Mar 14, 2016, at 9:54 AM, Helimap Postmaster <postmaster at helimap.ch>
>> wrote:
>> >
>> > Hello!
>> >
>> > I am currently developing an application which would benefit from using
>> a buffer when reading a las file.
>> >
>> > The C++ API has a CreateCached method in the ReaderFactory, but I can't
>> seem to discover which is the intended way to use it, there's no reference
>> anywhere on the documentation, and actually no other method calls it.
>> >
>> > Is it as simple as
>> >
>> > liblas::ReaderFactory readerFactory;
>> > boost::uint32_t cache_size = 1000;
>> > liblas::Reader reader(lasFStream, cache_size);
>>
>> Pol,
>>
>> I would suggest if you are starting fresh with including LAS reading into
>> your software that you start with either PDAL http://pdal.io or LASlib
>> https://github.com/LAStools/LAStools/tree/master/LASlib
>>
>> For LAS files, PDAL is going to allow you to read in a one-at-a-time
>> streamed fashion or as a giant single buffer. It of course also supports
>> LASzip and many other point cloud format types.
>>
>> Thanks,
>>
>> Howard
>>
>> PS libLAS is now in "maintenance mode" and should only be used by
>> projects that have historically used it in the past. If you are doing new
>> things, you should use PDAL or look to other things like LASlib
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/liblas-devel/attachments/20160315/acbc20cb/attachment.html>


More information about the Liblas-devel mailing list