m-schuetz / SimLOD

MIT License
458 stars 25 forks source link

Is there a script to convert ply or other formats to the laz or simlod format #1

Closed MrNeRF closed 11 months ago

MrNeRF commented 11 months ago

Hi Marcus,

thank you for the impressive work. I am playing a bit with your code and its fun to watch how fast the point cloud builds up. Mabye I missed it but do you offer scripts that convert ply or other formats into one of the formats {las,laz,simlod}?

Btw, I had trouble to link the project, set breakpoints, etc on Ubuntu. It also crashes when you don't have a env var CUDA_PATH specified. I have fixed this in my fork. I will later open a pr to contribute back.

Thanks a lot, Janusch

m-schuetz commented 11 months ago

Hi Janusch,

You could try CloudCompare to transform various formats, including ply, to las or laz. It also has a command line tool that might be more suitable if you've got some really large point clouds.

To convert from las to simlod, you can use this script here: https://github.com/m-schuetz/SimLOD/blob/main/tools/las2simlod.mjs. (I'm not sure if it correctly handles las version 1.3 because of how numPoints is read from the header. Could be that 1.3 should read numPoints like verison 1.2, but the script handles version 1.3 like 1.4. Luckily, most las files are either version 1.2 or 1.4)

Btw, I had trouble to link the project, set breakpoints, etc on Ubuntu. It also crashes when you don't have a env var CUDA_PATH specified. I have fixed this in my fork. I will later open a pr to contribute back.

Thanks, that's much appreciated!

Serniorpepe commented 11 months ago

To convert ply to las, you could also use pdal translate, just give filename and file format to input and outputs and it does the conversion https://pdal.io/en/2.6.0/apps/translate.html

MrNeRF commented 11 months ago

Thank you both for the pointers. That gives me a good start what to use and explore!