<div dir="ltr">You need to build your writer as a shared plugin and make sure that the dll/so that you create is in a folder where the plugin manager will look for it (or set PDAL_DRIVER_PATH). Take a look at one of the existing plugins in the "plutgins" subdirectory of pdal. Let me know if you need more help.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 10, 2017 at 5:11 PM, Paul Schrum <span dir="ltr"><<a href="mailto:paul.schrum@gmail.com" target="_blank">paul.schrum@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><div><div><div><div><div>I am developing a custom PDAL writer for my GSoC project. (<a href="https://trac.osgeo.org/grass/wiki/GSoC/2017/IntegrationOfPDALintoGRASSGIS" target="_blank">Link</a>) Source Code is on <a href="https://github.com/PaulSchrum/v_in_pdal" target="_blank">github</a>. The module compiles, but it is an intermediate state since I am in the process of developing it.<br><br></div>I have the custom writer, PdalVectorMapWriter, inheriting from writer and it compiles okay. Currently all functions just print out their own name and return.<br><br></div>In main.cpp I create the pipeline json string and create a PipelineExecutor with it. I then call pipeline-> validate. This throws an exception stating <br><br><span style="font-family:monospace,monospace">terminate called after throwing an instance of 'pdal::pdal_error'<br> what(): Couldn't create writer stage of type 'writers.PdalVectorMapWriter'.</span><br><br></div>So I am thinking that I need somehow to inform Pdal about an instance of the class. But as I go over the Pdal documentation, I do not see how to do that. Can someone help me understand what I need to do?<br><br></div>- Paul<br><br></div>Here is a key code snippet:<br><span style="font-family:monospace,monospace">81 std::string pipeline_json =<br>82 pipelineJson::<wbr>basicVectorMapReaderWriter(<wbr>inFile,outFile);<br>83<br>84 cout << pipeline_json << endl; //diagnostic only<br>85 cout << endl;<br>86 G_important_message(_("Running the pipeline ..."));<br>87 auto pipeline = new pdal::PipelineExecutor(<wbr>pipeline_json);<br>88 <br>87 cout << "is valid? " << pipeline->validate() << endl;<br></span><br></div><div>Line 87 throws the exception.<br></div><br><br>Here is the json string being passed to the PipelineExecutor constructor:<br><div><font size="2"><span style="font-family:monospace,monospace"><br>{ "pipeline":[<br><font size="1"> "/home/user/Desktop/ALL/<wbr>SourceModules/cpp/grass7_<wbr>trunk/vector/v.in.pdal/<wbr>testFiles/100-points.las",<br></font>{<br> "type":"writers.<wbr>PdalVectorMapWriter",<br> "filename":"100-points"<br>}<br> ]<br>}</span></font><br><br><div><div><br><br></div></div></div></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>