<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hey there!<br></div><div><br></div><div>Hopefully this will be my last question, let see if I can finally get it right. </div><div>I tried today to use the Pipeline manager as recommended. But I cant figure out how to make it work with an reader.buffer type as input.<br></div><div><br></div><div>If I put the JSON like this:</div><div>{<br>  "pipeline":[<br>    {<br>      "type":"readers.buffer"<br>    },<br>    {<br>      "type":"filters.chipper",<br>      "capacity":"400"<br>    },<br>    {<br>      "type":"writers.pgpointcloud",<br>      "connection":"dbname='lidar' user='user'"<br>    }<br>  ]<br>}</div><div><br></div><div>I get the error:  Couldn't create reader stage of type 'readers.buffer'.<br></div><div><br></div><div><br></div><div>If I stage the buffer as seen on SmoothKernel.cpp y get the same error.<br></div><div>....<br></div><div><span style="font-family:monospace,monospace">    PipelineManager mgr;<br>    mgr.readPipeline("../p.json");<br><br><br>        BufferReader& bufferReader =<br>                dynamic_cast<BufferReader&>(</span><wbr><span style="font-family:monospace,monospace">mgr.makeReader("", "readers.buffer"));<br>                        bufferReader.addView(view);<br>      mgr.prepare();<br>    mgr.execute();</span><br></div><div>....<br></div><div><br></div><div>This is the program I am working on right now: <br></div><div><br></div><div><span style="font-family:monospace,monospace">#include <pdal/filters/ChipperFilter.</span><wbr><span style="font-family:monospace,monospace">hpp><br>#include <io/BufferReader.hpp><br>#include <io/BufferReader.hpp><br><br>#include <pdal/Kernel.hpp><br>#include <pdal/pdal_export.hpp><br>#include <pdal/util/FileUtils.hpp><br><br>#include<pdal/</span><wbr><span style="font-family:monospace,monospace">PipelineReaderJSON.hpp><br>//#include <pdal/plugins/pgpointcloud/io/</span><wbr><span style="font-family:monospace,monospace">PgCommon.hpp"><br><br>#include <memory><br>#include <vector><br><br>#include <pdal/PDALUtils.hpp><br>#include <pdal/StageFactory.hpp><br>#include <pdal/PipelineExecutor.hpp><br>#include <pdal/util/FileUtils.hpp><br><br>void fillView(pdal::PointViewPtr view)<br>{<br>    struct Point<br>    {<br>        double x;<br>        double y;<br>        double z;<br>    };<br><br>    for (float i = 0; i < 10000; i += 1.0)<br>    {<br>        Point p;<br><br>        p.x = -93.0 + i*0.00000001*i;<br>        p.y = 42.0 + i*0.00001*i*i;<br>        p.z = 106.0 + i;<br><br>        view->setField(pdal::<wbr>Dimension::Id::X, i, p.x);<br>        view->setField(pdal::<wbr>Dimension::Id::Y, i, p.y);<br>        view->setField(pdal::<wbr>Dimension::Id::Z, i, p.z);<br>    }<br>}<br><br><br>int main()<br>{<br>    using namespace pdal;<br>    <br><br>    PointTable table;<br>    table.layout()->registerDim(<wbr>Dimension::Id::X);<br>    table.layout()->registerDim(<wbr>Dimension::Id::Y);<br>    table.layout()->registerDim(<wbr>Dimension::Id::Z);<br><br>    PointViewPtr view(new PointView(table));<br>    fillView(view);<br>    BufferReader r;<br>    r.addView(view);<br><br><br>    PipelineManager mgr;<br>    mgr.readPipeline("../p.json");<br><br><br>    mgr.prepare();<br>    mgr.execute();<br>}</span></div><div><br></div><div>p.json is:</div><div><br></div><div><span style="font-family:monospace,monospace">{<br>  "pipeline":[<br></span></div><div><span style="font-family:monospace,monospace">    {"type":"readers.buffer"           <-wrong<br></span></div><div><span style="font-family:monospace,monospace">    },<br>    {<br>      "type":"filters.chipper",<br>      "capacity":"400"<br>    },<br>    {<br>      "type":"writers.pgpointcloud",<br>      "connection":"dbname='lidar' user='user'"<br>    }<br>  ]<br>}</span><br></div><div><br></div><div>Again, thanks in advance for your help.<br></div><div><br></div><div><br></div><div><br>-- <br><div class="m_-6697739568280544307gmail_signature"><div dir="ltr"><b>David Serret </b>- R&D Engineer at Eigen Dynamics SL<br><img src="http://www.eigendynamics.com/wp-content/uploads/2017/02/EigenLogo200dpi-1.jpg" width="200" height="88"></div></div>
</div></div></div></div></div></div></div>