libLAS/PDAL

Any question about other libraries used in this project
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: libLAS/PDAL

Post by daniel »

Thanks, I'll try to follow these instructions.
Daniel, CloudCompare admin
Jälv
Posts: 28
Joined: Sun Jul 02, 2017 8:35 pm

Re: libLAS/PDAL

Post by Jälv »

I ended up asking PDAL's team for some help, and they delivered.

PDAL produces 2 libs: pdalcpp and pdal_util.
I was linking to pdalcpp as it is what's in the PDAL_LIBRARIES CMake variable.
But, it turns out that on windows you also have to explicitly link pdal_util

So I was able to compile and quickly test on windows using Visual Studio 2015, QT 5.7 and PDAL.

I tried to compile PDAL with Visual Studio 2013 but that didn't worked, i might give it another shot
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: libLAS/PDAL

Post by daniel »

Okay I almost managed to compile PDAL thanks to the blog post you linked previously... but indeed it's not compatible with Visual 2013 :(

I started compiling everything with Visual 2017, but it will take some time (and I hope I'll be able to compile all the plugins with it!).
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: libLAS/PDAL

Post by daniel »

Okay, CC compiles at 98% with Visual 2017 (I just miss the FBX SDK for Visual 2017, let's hope it will be out soon).

And I did managed to compile PDAL with Visual 2017, but your branch didn't compile. I got an error relative to the inclusion of 'json.h' (in PDAL's LasWriter.hpp file) as well as a shitstrom of errors regarding double definitions of a lot of Windows stuff (mostly in WinSock2.h).

I managed to get rid of the first error by adding the path to jsoncpp in PDAL's vendor folder. But for the other errors?! Any idea about this?
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: libLAS/PDAL

Post by daniel »

I found this old PDAL issue: https://github.com/PDAL/PDAL/issues/416

However it's not clear whether they fixed it or not?!

EDIT: adding WIN32_LEAN_AND_MEAN to the project definitions (preprocessors) does the trick... however I would be curious to understand why I need this on my side and you don't? Same thing for the 'json.h' include.
Daniel, CloudCompare admin
Jälv
Posts: 28
Joined: Sun Jul 02, 2017 8:35 pm

Re: libLAS/PDAL

Post by Jälv »

I also had the json/json.h issue and I must do the same thing as you did, copy the json/json.h folder from the pdal/vendor folder

For the WinSock2.h I think I have the same issue using Visual 2017 (and MSVC 2017), so instead I tell Visual Studio 2017 to use MSVC 2015 (which can be installed from the VS2017 installer) as the compiler for the project and it compiles without these errors.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: libLAS/PDAL

Post by daniel »

Okay I finally managed to compile PDAL for Visual 2017 and your portage seems to work fine.

My last concern is about the ability to mix debug and release versions (I need this to work properly with Visual Studio). I'll see what I can do asap.
Daniel, CloudCompare admin
Jälv
Posts: 28
Joined: Sun Jul 02, 2017 8:35 pm

Re: libLAS/PDAL

Post by Jälv »

Ok, let me know if you have problems,

For now there are still a few things i need to fix:
- When writing, some clouds gets shifted to the upper right by bbMin.x/2 and bbMax.y/2
- The spatial reference is not saved yet

And also, with PDAL the actual file reading and writing doesn't happen during the for loops, which means that for example, when opening big files the UI will be unresponsive until PDAL is done reading .
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: libLAS/PDAL

Post by daniel »

Okay, we'll do this in a separate thread then (so as to leat the UI breath). I'll do this when your branch will be ready.
Daniel, CloudCompare admin
hobu
Posts: 4
Joined: Mon Jan 13, 2014 4:27 am

Re: libLAS/PDAL

Post by hobu »

> And also, with PDAL the actual file reading and writing doesn't happen during the for loops, which means that for example, when opening big files the UI will be unresponsive until PDAL is done reading

PDAL has a "streaming" API that will allow you to have libLAS' one-at-a-time reading behavior for large files. It will not work for Pipelines, however, and you'll have to explicitly compose stages and use them together. Not all PDAL stages support this mode.

Please email the PDAL mailing list if you're stuck. We're very supportive of the effort and want to do whatever we can to make things smooth for you.
Post Reply