<div dir="ltr">this is very helpful. Thanks for passing along some of the backstory.  The visualization comment caught my eye:<div><br></div><div><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px"><code style="box-sizing:border-box;font-family:sfmono-regular,consolas,"liberation mono",menlo,courier,monospace;font-size:11.9px;padding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-radius:3px">>writers.pclvisualizer</code></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px">>Exists as a writer simply so that we can stick it on the end of a pipeline and visualize the results. But you >probably have a tool to view the results anyway, and this doesn't write anything to disk (should you be happy with >your result and want to save it).</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px">Actually, I don't have such a tool just yet.  Hobu uses <a href="http://plas.io">plas.io</a> but ... uploading a file to a web app seems impractical for me.  What do you use?  I'm on a LinuxMint environment.</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px"><br></p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px">msr</p><p style="box-sizing:border-box;margin-top:0px;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px"><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 15, 2017 at 5:56 AM, Bradley Chambers <span dir="ltr"><<a href="mailto:brad.chambers@gmail.com" target="_blank">brad.chambers@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"><div>Michael,</div><div><br></div>Also, if you take a peek at the PCL plugin prior to our refactor (proposed [1] and implemented [2]), you'll see some good examples of doing exactly what you propose wrt extracting indices in many of the filters, for example [3] and [4].<div><br></div><div>Brad<br><div><div><br></div><div>[1] <a href="https://github.com/PDAL/PDAL/issues/1404" target="_blank">https://github.com/PDAL/<wbr>PDAL/issues/1404</a></div><div>[2] <a href="https://github.com/PDAL/PDAL/pull/1432" target="_blank">https://github.com/PDAL/<wbr>PDAL/pull/1432</a></div><div>[3] <a href="https://github.com/PDAL/PDAL/blob/006ea71362a5486109f48d2981b72ada15b31916/plugins/pcl/filters/DartSampleFilter.cpp#L84-L98" target="_blank">https://github.com/PDAL/PDAL/<wbr>blob/<wbr>006ea71362a5486109f48d2981b72a<wbr>da15b31916/plugins/pcl/<wbr>filters/DartSampleFilter.cpp#<wbr>L84-L98</a><br></div><div>[4] <a href="https://github.com/PDAL/PDAL/blob/d32c77f37007a494ce88e1e9ca64a14a6b21892f/plugins/pcl/filters/GroundFilter.cpp#L99-L161" target="_blank">https://github.com/PDAL/<wbr>PDAL/blob/<wbr>d32c77f37007a494ce88e1e9ca64a1<wbr>4a6b21892f/plugins/pcl/<wbr>filters/GroundFilter.cpp#L99-<wbr>L161</a></div><div><br></div><div><br></div></div></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 14, 2017 at 8:53 PM Bradley Chambers <<a href="mailto:brad.chambers@gmail.com" target="_blank">brad.chambers@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_1425791312341126455gmail_msg">Michael,<div class="m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="m_1425791312341126455gmail_msg">You are correct that there is no out of the box LAS point type, although you could in theory create one [1].</div><div class="m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="m_1425791312341126455gmail_msg">Various PCL modules provide methods such as "getInliers" to get a vector of indices [2]. PCL treatment of inliers varies somewhat from module to module, so one has to read the docs carefully.</div><div class="m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="m_1425791312341126455gmail_msg">For an example of acting on the indices, you can look at the OutlierFilter where we start by processing a PointView to obtain (in this case) two vectors of PointIds, the inliers and the outliers [3]. We later create a new output PointView by appending only the inliers from the input PointView [4].</div><div class="m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="m_1425791312341126455gmail_msg">No need to sort. The PDAL to PCL conversion [5] is order preserving, so unless your PCL code is doing something to the order, you should be good.</div><div class="m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="m_1425791312341126455gmail_msg">Brad</div><div class="m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="m_1425791312341126455gmail_msg">[1] <a href="http://pointclouds.org/documentation/tutorials/adding_custom_ptype.php#how-to-add-a-new-pointt-type" class="m_1425791312341126455gmail_msg" target="_blank">http://pointclouds.org/<wbr>documentation/tutorials/<wbr>adding_custom_ptype.php#how-<wbr>to-add-a-new-pointt-type</a></div><div class="m_1425791312341126455gmail_msg">[2] <a href="http://docs.pointclouds.org/1.7.1/classpcl_1_1_sample_consensus.html" class="m_1425791312341126455gmail_msg" target="_blank">http://docs.pointclouds.<wbr>org/1.7.1/classpcl_1_1_sample_<wbr>consensus.html</a></div><div class="m_1425791312341126455gmail_msg">[3] <a href="https://github.com/PDAL/PDAL/blob/master/filters/OutlierFilter.cpp#L159" class="m_1425791312341126455gmail_msg" target="_blank">https://github.com/PDAL/<wbr>PDAL/blob/master/filters/<wbr>OutlierFilter.cpp#L159</a></div><div class="m_1425791312341126455gmail_msg">[4] <a href="https://github.com/PDAL/PDAL/blob/master/filters/OutlierFilter.cpp#L203-L209" class="m_1425791312341126455gmail_msg" target="_blank">https://github.com/PDAL/<wbr>PDAL/blob/master/filters/<wbr>OutlierFilter.cpp#L203-L209</a></div><div class="m_1425791312341126455gmail_msg">[5] <a href="https://github.com/PDAL/PDAL/blob/master/plugins/pcl/PCLConversions.hpp#L127-L191" class="m_1425791312341126455gmail_msg" target="_blank">https://github.com/PDAL/<wbr>PDAL/blob/master/plugins/pcl/<wbr>PCLConversions.hpp#L127-L191</a></div><div class="m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div></div><br class="m_1425791312341126455gmail_msg"><div class="gmail_quote m_1425791312341126455gmail_msg"><div dir="ltr" class="m_1425791312341126455gmail_msg">On Tue, Mar 14, 2017 at 6:27 PM Michael Rosen <<a href="mailto:michael.rosen@gmail.com" class="m_1425791312341126455gmail_msg" target="_blank">michael.rosen@gmail.com</a>> wrote:<br class="m_1425791312341126455gmail_msg"></div><blockquote class="gmail_quote m_1425791312341126455gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_1425791312341126455gmail_msg"><div class="gmail_extra m_1425791312341126455gmail_msg"><div class="gmail_extra m_1425791312341126455gmail_msg">Picking up on a conversation started on Gitter:  <a href="https://gitter.im/PDAL/PDAL" class="m_1425791312341126455gmail_msg" target="_blank">https://gitter.im/PDAL/PDAL</a></div><div class="gmail_extra m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="gmail_extra m_1425791312341126455gmail_msg">One problem we have with the PCLBlock filter is that we currently drop all non-XYZ dimensions because when we marshal point cloud data from PDAL --> PCL we needs to specify a PCL-compatible point type and we pick XYZ.  As a result, when we marshal the result back, we there is nothing except XYZ.</div><div class="gmail_extra m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="gmail_extra m_1425791312341126455gmail_msg">One workaround suggested was to create a PCL point type that fits the data.  My quick look suggests there is not such point type, even for the simplest of LAS files.  Can someone confirm this?  These, I think, are the options <a href="http://docs.pointclouds.org/1.5.1/point__types_8hpp_source.html" class="m_1425791312341126455gmail_msg" target="_blank">http://docs.pointclouds.org/1.<wbr>5.1/point__types_8hpp_source.<wbr>html</a> ? So, For example, no way to carry Classification to say nothing of LAS metadata like the array of "Number of points by return."</div><div class="gmail_extra m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="gmail_extra m_1425791312341126455gmail_msg">The other suggestion was to return just the indices of the desired points.  Can someone say a little more about what PCL API would enable this?  Once we had it, how can we get PDAL to remove all the points except those returned?</div><div class="gmail_extra m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="gmail_extra m_1425791312341126455gmail_msg">One thought I had would be to sort the point cloud before marshaling it to PCL and similarly sort the result from PCL.  Create the desired result set by marching through the point clouds in parallel removing anything from the original point cloud that isn't in the PCL result.</div><div class="gmail_extra m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="gmail_extra m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="gmail_extra m_1425791312341126455gmail_msg"><br class="m_1425791312341126455gmail_msg"></div><div class="gmail_extra m_1425791312341126455gmail_msg">msr</div></div></div>
______________________________<wbr>_________________<br class="m_1425791312341126455gmail_msg">
pdal mailing list<br class="m_1425791312341126455gmail_msg">
<a href="mailto:pdal@lists.osgeo.org" class="m_1425791312341126455gmail_msg" target="_blank">pdal@lists.osgeo.org</a><br class="m_1425791312341126455gmail_msg">
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer" class="m_1425791312341126455gmail_msg" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/pdal</a></blockquote></div></blockquote></div>
</div></div></blockquote></div><br></div>