[pdal] Requesting help reading data from Pipeline Executor Metadata

Howard Butler howard at hobu.co
Wed Jul 26 14:14:30 PDT 2017


> On Jul 25, 2017, at 4:14 PM, Paul Schrum <paul.schrum at gmail.com> wrote:
> 
> I need to read metadata from a successfully run PipelineExecutor instance.  I think I am doing this correctly, but I haven't been able to find any example code which does what I need to do.
> 
> Can someone advise me on this?
> 
> Here is my code.  The line I believe is not behaving the way I expect is 665, which I confirm by printing its validty at line 670, which prints 0, which means Not Valid.
> 
> 649    std::string pipeline_
> 650            pipelineJson::basicVectorMapReaderWriter(infile,outmap);
> 
>             // I can confirm the executor is valid and runs correctly
> 653    auto plExecutor = new pdal::PipelineExecutor(pipeline_json);
> 
> 660    uint64_t pointCount = plExecutor->execute();
> 
> 663    pdal::MetadataNode root = plExecutor->getMetadata();
> 664    //auto root = plExecutor->getMetadata();
> 665    auto srsNode = root.findChild("srs");
> 666    
> 667    
> 668    auto val = srsNode.valid();
> 669    
> 670    cout << val << endl;
> 671    cout << "test" << endl;
> 
> Another note which may be helpful: when I change 668 to be
> 668    auto val = root.valid();
> 
> the validity prints 1, which indicates that it is valid.

print your node and see if there's anything there

std::cout << root << std::endl;

It's quite possible the srs node is empty.

Howard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20170726/c010d979/attachment.html>


More information about the pdal mailing list