[Liblas-devel] premature eof found

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Liblas-devel] premature eof found

Helimap Postmaster
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

_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] premature eof found

Helimap Postmaster
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 <[hidden email]> 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


_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] premature eof found

Helimap Postmaster
Nobody has had this problem? Or an idea of what might've going on?

I've tried compiling liblas 1.8.0 from its tag, same result.

On Thu, Apr 7, 2016 at 6:08 PM, Helimap Postmaster <[hidden email]> wrote:
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 <[hidden email]> 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



_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] premature eof found

Mateusz Loskot
On 8 April 2016 at 11:52, Helimap Postmaster <[hidden email]> wrote:
> Nobody has had this problem? Or an idea of what might've going on?

libLAS has been deprecated and is not actively maintained [1].
So, please don't expect prompt responses or fixes at all.

Instead, consider PDAL.

[1] https://lists.osgeo.org/pipermail/liblas-devel/2015-August/001605.html
[2] http://www.pdal.io/

--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] premature eof found

Helimap Postmaster
Hello Mateusz,

Oh that's sad...

liblas is on the ubuntu repositories which is a point in favor and it is also used in many applications like cloudcompare, which means there are a lot of examples and use cases.

pdal is a bit overkill if I only want las I/O. I've fiddled with it a little bit. It is a superb framework, but isn't it too much if I just want to read and write a las cloud to/from a buffer? Also, there aren't that many c++ examples for I/O and there's no way to read into a container, I would have to develop a pointtable myself and I won't have the time to get deep in it unfortunately...

I've also tried LASlib. Their code is obscure and the licensing more obscure.

Well, maybe I should give pdal another try...

On Fri, Apr 8, 2016 at 12:00 PM, Mateusz Loskot <[hidden email]> wrote:
On 8 April 2016 at 11:52, Helimap Postmaster <[hidden email]> wrote:
> Nobody has had this problem? Or an idea of what might've going on?

libLAS has been deprecated and is not actively maintained [1].
So, please don't expect prompt responses or fixes at all.

Instead, consider PDAL.

[1] https://lists.osgeo.org/pipermail/liblas-devel/2015-August/001605.html
[2] http://www.pdal.io/

--
Mateusz Loskot, http://mateusz.loskot.net


_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] premature eof found

isenburg
Hi,

Our LASlib code may be obscure (yet some like its simplicity) but the LASlib license is certainly not.


It's standard LGPL 2.1 ... not obscure at all.

Regards from the Philippines,

Martin @rapidlasso

On Fri, Apr 8, 2016 at 12:12 PM, Helimap Postmaster <[hidden email]> wrote:
Hello Mateusz,

Oh that's sad...

liblas is on the ubuntu repositories which is a point in favor and it is also used in many applications like cloudcompare, which means there are a lot of examples and use cases.

pdal is a bit overkill if I only want las I/O. I've fiddled with it a little bit. It is a superb framework, but isn't it too much if I just want to read and write a las cloud to/from a buffer? Also, there aren't that many c++ examples for I/O and there's no way to read into a container, I would have to develop a pointtable myself and I won't have the time to get deep in it unfortunately...

I've also tried LASlib. Their code is obscure and the licensing more obscure.

Well, maybe I should give pdal another try...

On Fri, Apr 8, 2016 at 12:00 PM, Mateusz Loskot <[hidden email]> wrote:
On 8 April 2016 at 11:52, Helimap Postmaster <[hidden email]> wrote:
> Nobody has had this problem? Or an idea of what might've going on?

libLAS has been deprecated and is not actively maintained [1].
So, please don't expect prompt responses or fixes at all.

Instead, consider PDAL.

[1] https://lists.osgeo.org/pipermail/liblas-devel/2015-August/001605.html
[2] http://www.pdal.io/

--
Mateusz Loskot, http://mateusz.loskot.net


_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel


_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] premature eof found

Mateusz Loskot
In reply to this post by Helimap Postmaster
On 8 April 2016 at 12:12, Helimap Postmaster <[hidden email]> wrote:
>
> pdal is a bit overkill if I only want las I/O.

Martin's LASlib is recommended replacement then.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Liblas-devel] premature eof found

Helimap Postmaster
In reply to this post by isenburg
Hello Martin,

I was maybe misquoting the article Mateusz linked, sorry for that.

About the code, I find obscure that the variables in LASpoint are public but you have setters. I can change have_rgb but the point will still not 'have' rgb. I am also worried about the performance issue of creating points for writing. In my use case I change the point type from xyz to xyzrgb and apparently that means I have to init a new point. Otherwise it doesn't have the writer.

I'm concerned because the init does clean the point and then it re-writes it. When dealing with trillions of points... I couldn't find how to 'change' a xyz point type to rgb.

I would suggest also having defines or const ints with the point types, I couldn't find them.

Is there a way to do it that I am missing?

Other than that, LASlib was the one that most suited my needs and played nice with windows.

Cheers,

Pol

ps. there's a thread I've posted in the lastools list about this, entitled set rgb with laslib

On Fri, Apr 8, 2016 at 12:21 PM, Martin Isenburg <[hidden email]> wrote:
Hi,

Our LASlib code may be obscure (yet some like its simplicity) but the LASlib license is certainly not.


It's standard LGPL 2.1 ... not obscure at all.

Regards from the Philippines,

Martin @rapidlasso

On Fri, Apr 8, 2016 at 12:12 PM, Helimap Postmaster <[hidden email]> wrote:
Hello Mateusz,

Oh that's sad...

liblas is on the ubuntu repositories which is a point in favor and it is also used in many applications like cloudcompare, which means there are a lot of examples and use cases.

pdal is a bit overkill if I only want las I/O. I've fiddled with it a little bit. It is a superb framework, but isn't it too much if I just want to read and write a las cloud to/from a buffer? Also, there aren't that many c++ examples for I/O and there's no way to read into a container, I would have to develop a pointtable myself and I won't have the time to get deep in it unfortunately...

I've also tried LASlib. Their code is obscure and the licensing more obscure.

Well, maybe I should give pdal another try...

On Fri, Apr 8, 2016 at 12:00 PM, Mateusz Loskot <[hidden email]> wrote:
On 8 April 2016 at 11:52, Helimap Postmaster <[hidden email]> wrote:
> Nobody has had this problem? Or an idea of what might've going on?

libLAS has been deprecated and is not actively maintained [1].
So, please don't expect prompt responses or fixes at all.

Instead, consider PDAL.

[1] https://lists.osgeo.org/pipermail/liblas-devel/2015-August/001605.html
[2] http://www.pdal.io/

--
Mateusz Loskot, http://mateusz.loskot.net


_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel



_______________________________________________
Liblas-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/liblas-devel
Loading...