<div dir="ltr"><span style="font-size:12.8px">Hi Jason,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">It depends exactly what you want.  Our entwine software writes points in LAZ format in blocks using the compressor that's part of PDAL.  However, it's not writing straight LAZ files.  It's just writing the point data, not the header or the VLRs, etc.  Take a look at <a href="https://github.com/connormanning/entwine/blob/master/entwine/util/compression.cpp" target="_blank">https://github.com/<wbr>connormanning/entwine/blob/<wbr>master/entwine/util/<wbr>compression.cpp</a><div><br></div><div>We write points to databases natively, if that's what you want, but not LAZ tiles, as such.</div><div><br></div><div>If you want to write the entire LAZ file to a database, I don't know that we have anything that allows this directly.  You can certainly write a file, mmap the file and then just do a direct copy of the memory to whatever output source you'd like.  Most of the time, the OS won't even flush to physical disk unless you're short memory or force it with some flush()/sync() call, so there isn't much overhead.  Internally, the LAS/LAZ writer uses a std::ostream, which you could theoretically carve out of heap if you knew the size in advance (you don't, unless you want to be really pessimistic).  LAZ typically is written in chunks of points, so the memory can be limited, but if you want a ton of points written out without worrying about the LAZ chunking and such, you might have to allocate a bunch of memory.  Sometimes we do this on other formats because we have no choice, but that may not fit with your plan.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 11:14 AM, Jason Beverage <span dir="ltr"><<a href="mailto:jasonbeverage@gmail.com" target="_blank">jasonbeverage@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all!<div><br></div><div>Is there any way to have PDAL read or write LAZ format from/to a memory stream or would the best way be to read and write to a file and then just load the data into memory myself.</div><div><br></div><div>For example, say I wanted to store laz tiles in an sqlite database instead of on disk similar to how mbtiles works.</div><div><br></div><div>I'm just doing some experiments now and was curious if there was any built in capability for this.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Jason</div></font></span></div>
<br>______________________________<wbr>_________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/pdal</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>
</div>