Coder Social home page Coder Social logo

faisal-w / potreeconverter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from potree/potreeconverter

0.0 3.0 0.0 5.48 MB

Create multi res point cloud to use with potree

Home Page: http://potree.org

License: Other

CMake 0.21% C++ 3.97% JavaScript 51.48% CSS 0.02% HTML 0.16% Mathematica 44.16%

potreeconverter's Introduction

Potree Converter

Builds a potree octree from las, laz, binary ply, xyz or ptx files.

Downloads

Changelog

See docs/changelog.md for a list of new features, bugfixes and changes to the API.

Dependencies

Build

Linux/MacOSX:

mkdir build && cd build
cmake ../
make

# copy ./PotreeConverter/resources/page_template to your binary working directory.

Linux with custom builds of liblas and laszip

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DLIBLAS_INCLUDE_DIR=/opt/source/libLAS-1.8.0/build/include/ -DLIBLAS_LIBRARY=/opt/source/libLAS-1.8.0/build/lib/liblas.so -DLASZIP_INCLUDE_DIR=/opt/source/laszip-2.1.0/build/include -DLASZIP_LIBRARY=/opt/source/laszip-2.1.0/build/lib/liblaszip.so ..

Ubuntu:

sudo apt-get install libboost-system-dev libboost-thread-dev

# Add UbuntuGIS "unstable" PPA from Launchpad
# (TODO: test if this PPA is really necessary)
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install liblas-dev liblas-c-dev

mkdir build && cd build
cmake ../
make

# copy ./PotreeConverter/resources/page_template to your binary working directory.

Windows / Microsoft Visual Studio 2012:

# make sure you've got these environment variables set with your directory structure
set BOOST_ROOT=D:\dev\lib\boost_1_56_0
set BOOST_LIBRARYDIR=D:\dev\lib\boost\x64
set LIBLAS_INCLUDE_DIR=D:\dev\lib\libLAS\include
set LIBLAS_LIBRARY_DIR=D:\dev\lib\libLAS\build\bin\Release

mkdir build
cd build

# 32bit project
cmake -G "Visual Studio 11" -T "v110" -DBoost_USE_STATIC_LIBS=ON -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DLIBLAS_INCLUDE_DIR=%LIBLAS_INCLUDE_DIR% -DLIBLAS_LIBRARY=%LIBLAS_LIBRARY_DIR%/liblas.lib  ..\

# or 64bit project
cmake -G "Visual Studio 11 Win64" -T "v110" -DBoost_USE_STATIC_LIBS=ON -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DLIBLAS_INCLUDE_DIR=%LIBLAS_INCLUDE_DIR% -DLIBLAS_LIBRARY=%LIBLAS_LIBRARY_DIR%/liblas.lib  ..\

# copy ./PotreeConverter/resources/page_template to your binary working directory.

PotreeConverter Usage

Converts las files to the potree file format. You can list multiple input files. If a directory is specified, all files inside the directory will be converted.

Options:

-h [ --help ]                         prints usage
-p [ --generate-page ]                Generates a ready to use web page alongwith the model.
-o [ --outdir ] arg                   output directory
-s [ --spacing ] arg                  Distance between points at root level. Distance halves each level.
-d [ --spacing-by-diagonal-fraction ] arg Maximum number of points on the diagonal in the first level (sets spacing). spacing = diagonal / value
-l [ --levels ] arg                   Number of levels that will be generated. 0: only root, 1: root and its children, ...
-f [ --input-format ] arg             Input format. xyz: cartesian coordinates as floats, rgb: colors as numbers, i: intensity as number
--color-range arg
--intensity-range arg
--output-format arg                   Output format can be BINARY, LAS or
                                      LAZ. Default is BINARY
-a [ --output-attributes ] arg        Can be any combination of RGB, INTENSITY, CLASSIFICATION and NORMAL. Default is RGB.
--scale arg                           Scale of the X, Y, Z coordinate in LAS and LAZ files.
--source arg                          Source file. Can be LAS, LAZ, PTX or

Examples:

# convert data.las and generate web page.
./PotreeConverter.exe C:/data.las -o C:/potree_converted -p

# convert with an octree depth of 5 (-l); generate web page (-p); write RGB, INTENSITY and CLASSIFICATION attributes (-a)
./PotreeConverter.exe data.las -o C:/potree_converted -p -l 5 -a RGB INTENSITY CLASSIFICATION

# generate compressed LAZ files instead of the default BIN format.
./PotreeConverter.exe C:/data.las -l 4 -o C:/potree_converted --output-format LAZ

# convert data1.las and data2.las with a spacing of 0.5 and a depth of 4
./PotreeConverter.exe C:/data1.las C:/data1.las C:/data2.las -s 0.5 -l 4 -o C:/potree_converted

# convert all files inside the data directory
./PotreeConverter.exe C:/data -s 0.5 -l 4 -o C:/potree_converted

potreeconverter's People

Contributors

m-schuetz avatar potree avatar sanak avatar dkastl avatar tigerfoot avatar eokeeffe avatar ghgr avatar

Watchers

James Cloos avatar Faisal Wirakusuma avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.