[pdal] PDAL Need Help

Howard Butler hobu.inc at gmail.com
Thu Jun 13 06:58:46 PDT 2013


Try trapping for the error and it should tell you which option it thinks is missing.

int main(int argc,char *argv[])
{
    try{
  
         pdal::drivers::las::Reader reader("interesting.las");
         reader.initialize();
         const pdal::Schema& schema = reader.getSchema();
         pdal::PointBuffer data(schema, 100);
         pdal::StageSequentialIterator* iterator =
        reader.createSequentialIterator(data);
         iterator->read(data);
    } catch (pdal::pdal_error& e)
   {
        std::cout << e.what() << std::endl;
   }
}

On Jun 13, 2013, at 8:18 AM, "Michael P. Gerlek" <mpg at flaxen.com> wrote:

> Nicolas -
> 
> That article was written 18 months ago when PDAL was still evolving -- I'm sure those code exsmples don't correspond well to the current codebase. 
> 
> PDAL does have good docs, those should be a better guide for you. 
> 
> .mpg, via iPhone
> 
> On Jun 13, 2013, at 6:33 AM, "Nicolas Mantelier" <nicolas.mantelier at spaceyes.fr> wrote:
> 
>> Hi,
>> 
>> I try to read las file with PDAL lib, 
>> I do a really simple project that I find in :
>> http://www.lidarnews.com/content/view/8880/65/
>> but it crash on exec
>> 
>> #include <pdal/drivers/las/Reader.hpp>
>> #include <pdal/PointBuffer.hpp>
>> #include <pdal/Stage.hpp>
>> #include <pdal/StageIterator.hpp>
>> #include <pdal/SpatialReference.hpp>
>> #include <pdal/Schema.hpp>
>> 
>> int main(int argc,char *argv[])
>> {
>> pdal::drivers::las::Reader reader("interesting.las");
>> reader.initialize();
>> const pdal::Schema& schema = reader.getSchema();
>> pdal::PointBuffer data(schema, 100);
>> pdal::StageSequentialIterator* iterator =
>> reader.createSequentialIterator(data);
>> iterator->read(data);
>> }
>> 
>> It crash on reader.initialize();
>> A buffer overflow has occurred in test.exe that damaged the internal state
>> of the program.
>> Exception Microsoft C++ : pdal::option_not_found
>> 
>> 
>> Someone did know where is my mistake?
>> 
>> Regards
>> 
>> 
>> _______________________________________________
>> pdal mailing list
>> pdal at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pdal
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal



More information about the pdal mailing list