[Liblas-devel] premature eof found

Helimap Postmaster postmaster at helimap.ch
Thu Apr 7 09:08:02 PDT 2016


It's crazy but If I check the tellg() I get the following output:

point: 1

fs stream at position 257

1.18074e+006, 6.11798e+006, 481.39

point: 2

fs stream at position 285

1.18074e+006, 6.11799e+006, 499.69

point: 3

fs stream at position 313

1.18074e+006, 6.11799e+006, 496.48

point: 4

fs stream at position 341

1.18074e+006, 6.118e+006, 509.77


up to point 106, instead of the 7th point. I have no clue on what's going
on here.

The latest points is at tellg 9445, the number of bytes available are 415342345
(found out with seekg and tellg)

On Thu, Apr 7, 2016 at 5:40 PM, Helimap Postmaster <postmaster at helimap.ch>
wrote:

> 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/b6c20797/attachment.html>


More information about the Liblas-devel mailing list