Hi, Thanks for pointing me the PDAL library. I will check its capabilities. For me, liblas is quite the standard library to work with points :)
About the exceptions, as I commented in my previous mail, I just adapted the read example from liblas ( https://github.com/libLAS/libLAS/blob/master/test/sample/read.cpp ). I can easily remove the "throw" statements and return the appropriate ReadResult object. You are right about the double -> float conversion. I will implement your approach for the next version (the minmax's are already calculated in the provided code). Anyway, there is lot of room for improvements: points streaming, octree generation, quadtree (specidific for GIS data), further LOD algorithms.... So just consider this implementation as the basic one to load LAS data. Bye, On Tue, Jun 17, 2014 at 9:40 AM, Rafa Gaitan <[email protected]> wrote: > Hi, > > Really nice contribution! I've been working with LiDAR data and OSG for a > while, and I've been using also the liblas library. Currently, I think, > PDAL(http://www.pdal.io/) is growing as a substitute of liblas but I > didn't have the time to change to that library yet. > > Just a couple of comments about your code: > > - I've seen you are throwing exceptions. OSG usually tries to avoid that, > or at least not to propagate the exception to upper layers, it will be > interesting to return a ReadResult::ERROR_IN_READ_FILE instead. > > - You are declaring a osg::Vec3Array and then inserting osg::Vec3d points. > liblas, and most of the pointcloud libraries use double precision points, > but OpenGL and OSG not (unless you are using OpenGL 4). So I recommend you > collect your vertices in a Vec3dArray and then substract a center to > increase the precision and fit the whole pointcloud in a range that it can > be rendered. If you don't do that, you will find that some pointclouds have > sets of points at the same position, because the Vec3d is clamped to a Vec3 > (double to float). > > Thank you very much for the contribution! If you have any question maybe I > could help you with the modifications. > > Regards, > Rafa. > > > > -- > Rafael Gaitán Linares > CTO at Mirage Technologies S.L - http://www.mirage-tech.com > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > -- Aitor Moreno aitormoreno [@] gmail.com
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
