HI Aitor,

Thanks for the submission.  I have started reviewing the submissions
but have stalled at the lack of FindlibLAS.cmake script in either the
submission or in the CMake-2.8 modules directory that comes installed
in the Cmake install I pulled in from the Kubuntu 14.04 repository.  I
have cmake 2.8.12.2 installed.

Do you have a find script?  We'd also need to add a check against
whether the libLAS has been found in the src/CMakeLists.txt.

Cheers,
Robert.

On 17 June 2014 13:49, Aitor Moreno <[email protected]> wrote:
> Hi,
>
> I implemented the changes. Attached you will find the revised LAS osgPlugin.
>
> - Exception are not used anymore.
> - A MatrixTransform is used to translate the whole object to the midpoint of
> the point cloud. This would reduce numerical precision problems.
>
> 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.
>>
>>
>> 2014-06-17 9:07 GMT+02:00 Aitor Moreno <[email protected]>:
>>>
>>> Hi everyone,
>>>
>>> Attached to this email, you will find a working version a osgPlugin which
>>> reads LAS files: The LAS file format is commonly used to store 3D point
>>> clouds [1].
>>>
>>>
>>>
>>>
>>> This contribution is a straightforward wrapper of the libLas library [2].
>>> Although precompiled versions could be used, I compiled libLas by myself
>>> from the GIT repo [3].
>>>
>>>
>>>
>>>
>>>
>>>
>>> In order to compile the plugin, BOOST is required (it is used by libLas,
>>> not the pluging itself). Some quick notes about this:
>>>
>>> - BOOST and the libraries can be found in the full 3rd party package [4]
>>>
>>>
>>>
>>>
>>> - It happens that COLLADA_INCLUDE_DIR points to the right place, so I
>>> used this in the CMakeLists.txt. But I guess, a new and independent CMake
>>> var should be added to define the BOOST include directory.
>>>
>>> - The BOOST_THREAD_LIBRARY and BOOST_THREAD_LIBRARY_DEBUG libraries have
>>> to be defined using CMake (add entry).
>>>
>>>
>>>
>>> About the implementation: The plugin is a mix between the 3dc osg plugin
>>> (it deals with points too) and the libLas read example. As the 3dc plugin,
>>> the points are arranged in 10000 batches.
>>>
>>> The LAS plugin has a "v" option to show the LAS header of the input
>>> files. Of course, it can be modified to use any other common OSG logging
>>> standards (osg::NOTIFY).
>>>
>>> The provided CMakeLists.txt have trivial modifications.
>>>
>>>
>>>
>>> - ${OSGROOT}/CMakeLists.txt >> FIND_PACKAGE (libLas)
>>> - ${OSGROOT}/src/osgPlugins/CMakeLists.txt >> ADD_SUBDIRECTORY (las)
>>>
>>> About the compatibility, it works in OSG 3.2.0 and the Trunk version.
>>> Sample LAS files can be found in [3].
>>>
>>>
>>>
>>>
>>> Best regards,
>>>
>>>
>>> [1]: LAS LIDAR FORMAT:
>>> http://www.asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html
>>> [2]: LibLas library:  http://www.liblas.org/
>>> [3]: LibLas GIT repo: https://github.com/libLAS/libLAS
>>> [4]: OSG precompiled 3rd party:
>>> http://www.openscenegraph.org/index.php/download-section/dependencies
>>>
>>> --
>>> Aitor Moreno
>>>    aitormoreno [@] gmail.com
>>>
>>> _______________________________________________
>>> osg-submissions mailing list
>>> [email protected]
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>>
>>
>>
>>
>> --
>> 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
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to