[Liblas-devel] premature eof found

Helimap Postmaster postmaster at helimap.ch
Thu Apr 7 08:40:51 PDT 2016


I am reading a las file but it fails to read after the 7th point throwing
an exception because it has reached eof.

The cloud is 150000 points, so it seems unlikely it has reached the end.

I am reading like stated on the tutorial
http://www.liblas.org/tutorial/cpp.html#reading-las-data-using-liblas-reader

with the only difference that I compiled a *static  *version of liblas. To
do that I had to change the CMakeLists slightly, mainly changing the
add_library to static and also I had to add the c++ sources to the c_api
(which I don't use) because the headers depend on some cpp sources.

I'm using the master from the git repository.

The las is not corrupt, as I can load it into cloudcompare just fine. I've
also tried with one of the liblas samples
http://www.liblas.org/samples/LAS12_Sample_withIntensity_Quick_Terrain_Modeler.las,
which fails at point 62. Another cloud I have failed at the header, at step
18.

Any idea of what might be happening?

Debugging I've gotten to the eof check in the read_n function, which is the
one that throws. In release, nothing happens as the exceptions are
disabled, but I only get the 6 points.

I'm under windows.

Cheers!

Pol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/liblas-devel/attachments/20160407/d59e5769/attachment.html>


More information about the Liblas-devel mailing list