Page 2 of 4

Re: libLAS/PDAL

Posted: Tue Jul 11, 2017 7:57 pm
by daniel
Thanks, I'll try to follow these instructions.

Re: libLAS/PDAL

Posted: Wed Jul 12, 2017 11:04 pm
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

Re: libLAS/PDAL

Posted: Fri Jul 14, 2017 12:10 pm
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!).

Re: libLAS/PDAL

Posted: Sun Jul 16, 2017 6:36 pm
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?

Re: libLAS/PDAL

Posted: Sun Jul 16, 2017 6:42 pm
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.

Re: libLAS/PDAL

Posted: Mon Jul 17, 2017 7:57 am
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.

Re: libLAS/PDAL

Posted: Thu Jul 20, 2017 8:31 pm
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.

Re: libLAS/PDAL

Posted: Fri Jul 28, 2017 8:13 am
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 .

Re: libLAS/PDAL

Posted: Fri Jul 28, 2017 11:26 am
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.

Re: libLAS/PDAL

Posted: Fri Jul 28, 2017 6:26 pm
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.