Skip to content

Point set processing: LAS I/O#2138

Merged
lrineau merged 98 commits intoCGAL:masterfrom
sgiraudot:Point_set_processing-Las_IO-GF
Jul 17, 2017
Merged

Point set processing: LAS I/O#2138
lrineau merged 98 commits intoCGAL:masterfrom
sgiraudot:Point_set_processing-Las_IO-GF

Conversation

@sgiraudot
Copy link
Copy Markdown
Contributor

Summary of Changes

Input/output functions for LAS format (+ updated functions for PLY).

Release Management

@sgiraudot sgiraudot added Pkg::Point_set_processing_3 pre-approved For pre-approved small features. After 15 days the feature will be accepted. Small feature labels May 24, 2017
@sgiraudot sgiraudot mentioned this pull request May 24, 2017
@sgiraudot
Copy link
Copy Markdown
Contributor Author

There are bugs in Travis because I forgot to update one part of the code that rely on the PLY reader. I'll fix it.

@sgiraudot
Copy link
Copy Markdown
Contributor Author

Bugs should be fixed.

@sgiraudot
Copy link
Copy Markdown
Contributor Author

Note (cc @lrineau): we should install LASlib on some of the platforms of the testsuite so that this new feature is tested properly (we now have a dedicated fork that should be easy to install).

@lrineau
Copy link
Copy Markdown
Member

lrineau commented May 29, 2017

@sgiraudot @maxGimeno You should work together and propose a pull-request to some docker images at https://github.com/CGAL/cgal-testsuite-dockerfiles.

@afabri
Copy link
Copy Markdown
Member

afabri commented May 29, 2017

And you (Simon&Maxime) should also look with @janetournois for Windows.

# It assumes that find_package(LASLIB) was already called.

add_definitions(-DCGAL_LINKED_WITH_LASLIB)
add_definitions(-DCGAL_LINKED_WITH_LASLIB -DUSE_AS_DLL)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does that name USE_AS_DLL come from? It should have a kind of namespacing: LASLIB_USED_AS_DLL, or
CGAL_USE_LASLIB_AS_DLL...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's from LASlib.

We forked it, so I could change it, but I'd rather change as little things as possible in the library. Maybe I can add #define USE_AS_DLL inside the CGAL code just before including the LASlib header and #undef right after (there is exactly one inclusion of LASlib). What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the CMake command was a target_compile_definitions, just for a specific target, that would be fine. But here the line add_definitions(-DCGAL_LINKED_WITH_LASLIB -DUSE_AS_DLL) will add -DUSE_AS_DLL to all compilation commands of the CMake project.

If that is not too complicated to hide that macro in just one header of CGAL, I would prefer.

@janetournois
Copy link
Copy Markdown
Member

Sosno should be ready to test this PR on visual studio 2015.

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Jun 2, 2017

  1. The Travis build failed, for a trivial reason (the license-checking macros).
  2. More important: that PR does not compile on my machine. The error is in FindLASLIB.

ENV LASLIB_LIB_DIR
)

if(LASLIB_LIBRARIES)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If LASLIB_LIBRARIES evaluates to TRUE, but not LASZIP_INCLUDE_DIR, there is a CMake error.

On my machine, there is a file /usr/lib64/liblas.so, from the package liblas-devel-1.8.0-13.fc25.x86_64, that corresponds to http://www.liblas.org, and LASLIB_LIBRARIES is automatically set to /usr/lib64/liblas.so, but LASZIP_INCLUDE_DIR remains NOTFOUND.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main problem here is that libLAS != LASlib, although both libraries use the same filename… so anyway, there's no way the code will compile, even if we add LASzip. I'm not sure at all how we can handle that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think LASLIB_FOUND should not be set to true if LASLIB_INCLUDE_DIR is not-found. That would probably solve the issue I have had.

@sgiraudot
Copy link
Copy Markdown
Contributor Author

I added the test for LASLIB_INCLUDE_DIR.

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Jun 7, 2017

That works correctly now on my machine: instead of a CMake critical error, I just have the message

the LAS IO plugin needs LAS libraries and will not be compiled.

as expected.

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Jun 7, 2017

It seems that PR change the API that was introduced in CGAL-4.8 by Small_Features/Point_set_processing_ply_io and modified in CGAL-4.9 by Small_Features/Extend_PLY_point_set_reader. What is the upgrade path for users of that documented API? If that is a simple breakable, then the changes.html should mention the breakage, with a bold Breaking change: in the text.

@sgiraudot
Copy link
Copy Markdown
Contributor Author

Good point. I've updated changes.html.

points with properties is modified for unification with LAS
(see <code>CGAL::read_ply_points_with_properties()</code>). A new
function to write PLY with properties is provided
(<code>CGAL::write_las_points_with_properties()</code>).</li>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you have swapped the two names of functions CGAL::read_ply_points_with_properties()/CGAL::write_las_points_with_properties() in the description.

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Jun 7, 2017

The Travis error will remain:

The following files do not have an include directive of the package license header:
Point_set_processing_3/include/CGAL/IO/write_las_points.h
Point_set_processing_3/include/CGAL/IO/read_las_points.h

https://travis-ci.org/CGAL/cgal/jobs/238376800#L4070

The two files should include:

#include <CGAL/license/Point_set_processing_3.h>

@sgiraudot
Copy link
Copy Markdown
Contributor Author

Alright, I fixed both problems (error in changes.html + license check).

@lrineau
Copy link
Copy Markdown
Member

lrineau commented Jun 7, 2017

Doxygen error:

.../doc/Documentation/Installation.txt:576: Warning: Unexpected html tag <span> found within <a href=...> context
.../doc/Documentation/Installation.txt:576: Warning: Unexpected html tag </span> found within <a href=...> context

https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-4.11-Ic-35/Documentation.log

@sgiraudot sgiraudot force-pushed the Point_set_processing-Las_IO-GF branch from 1807376 to 56919f9 Compare July 11, 2017 10:00
@sgiraudot
Copy link
Copy Markdown
Contributor Author

The static assertion should be fixed and the branch is rebased.

@sgiraudot sgiraudot mentioned this pull request Jul 11, 2017
@sgiraudot
Copy link
Copy Markdown
Contributor Author

Everything looks good except for the remaining warning on Windows DLL. I deactivated it in the code: it comes from LASlib and I'd rather change our fork of LASlib as little as possible (and this warning seems to require many additions of the export DLL mechanism). Anyway, we already deactivated a warning from GCC for the inclusion of LASlib…

@sgiraudot
Copy link
Copy Markdown
Contributor Author

The remaining error on Windows should be fixed.

@lrineau lrineau added the rm only: ready for master For the release team only: that indicates that a PR is about to be merged in 'master' label Jul 17, 2017
@lrineau lrineau merged commit c59454e into CGAL:master Jul 17, 2017
lrineau added a commit that referenced this pull request Jul 17, 2017
@lrineau lrineau added Tested and removed rm only: ready for master For the release team only: that indicates that a PR is about to be merged in 'master' Ready to be tested Under Testing labels Jul 17, 2017
@lrineau lrineau deleted the Point_set_processing-Las_IO-GF branch July 17, 2017 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants