GithubHelp home page GithubHelp logo

curioustauseef / potreeconverter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from potree/potreeconverter

0.0 1.0 0.0 17.65 MB

Create multi res point cloud to use with potree

Home Page: http://potree.org

License: Other

CMake 0.16% Makefile 0.02% C++ 14.20% C 0.60% HTML 1.63% JavaScript 52.23% CSS 0.94% PHP 0.01% Mathematica 30.20%

potreeconverter's Introduction

Potree Converter

Master: Build Status Develop: Build Status

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

Downloads

Dependencies

Build

linux / gcc 4.9

lastools (from fork with cmake)

cd ~/dev/workspaces/lastools
git clone https://github.com/m-schuetz/LAStools.git master
cd master/LASzip
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

PotreeConverter

cd ~/dev/workspaces/PotreeConverter
git clone https://github.com/potree/PotreeConverter.git master
cd master
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DLASZIP_INCLUDE_DIRS=~/dev/workspaces/lastools/master/LASzip/dll -DLASZIP_LIBRARY=~/dev/workspaces/lastools/master/LASzip/build/src/liblaszip.so ..
make

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

OS X

Same as the linux instructions above, except:

  1. Give cmake absolute paths to the LASzip tools you just built. (Otherwise make might not be able to find them)
  2. LASZip library will be called liblaszip.dylib, not liblaszip.so
...

cmake -DCMAKE_BUILD_TYPE=Release -DLASZIP_INCLUDE_DIRS=[ABSOLUTE_PATH_TO_LASTOOLS]/master/LASzip/dll -DLASZIP_LIBRARY=[ABSOLUTE_PATH_TO_LASTOOLS]/master/LASzip/build/src/liblaszip.dylib ..
make

Windows / Microsoft Visual Studio 2017:

lastools

cd D:/dev/workspaces/lastools/
git clone https://github.com/m-schuetz/LAStools.git master
cd master/LASzip
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" ../

PotreeConverter

# make sure you've got these environment variables set with your directory structure
set LASZIP_INCLUDE_DIRS=D:\dev\workspaces\lastools\master\LASzip\dll
set LASZIP_LIBRARY=D:\dev\workspaces\lastools\master\LASzip\build\src\Release\laszip.lib

# checkout PotreeConverter
cd D:/dev/workspaces/PotreeConverter
git clone https://github.com/potree/PotreeConverter.git master
cd master
mkdir build
cd build

# VS2017 64bit project
cmake -G "Visual Studio 15 2017 Win64" -DLASZIP_INCLUDE_DIRS=%LASZIP_INCLUDE_DIRS% -DLASZIP_LIBRARY=%LASZIP_LIBRARY%  ..\

# 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 ] arg              Generates a ready to use web page with the given name.
-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
--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.
--aabb arg                              Bounding cube as "minX minY minZ maxX maxY maxZ". If not provided it is automatically computed
--incremental                           Add new points to existing conversion
--overwrite                             Replace existing conversion at target directory
--source arg                            Source file. Can be LAS, LAZ, PTX or PLY

Examples:

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

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

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

# first, convert with custom bounding box and then append new_data.las afterwards.
# points in new_data MUST fit into bounding box!
./PotreeConverter.exe C:/data -o C:/potree_converted -aabb "-0.748 -2.780 2.547 3.899 1.867 7.195"
./PotreeConverter.exe C:/new_data.las -o C:/potree_converted --incremental

# tell the converter that coordinates are in a UTM zone 10N projection. Also, create output in LAZ format
./PotreeConverter.exe C:/data -o C:/potree_converted -p pageName --projection "+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs" --overwrite --output-format LAZ

# using a swiss projection. Use http://spatialreference.org/ to find projections in proj4 format
./PotreeConverter.exe C:/data -o C:/potree_converted -p pageName --projection "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs" --overwrite

potreeconverter's People

Contributors

cvvergara avatar dkastl avatar eokeeffe avatar ghgr avatar headart avatar jamescorbett avatar m-schuetz avatar oscarmartinezrubi avatar peppsac avatar pijemcolu avatar potree avatar robertmrk avatar sanak avatar svenstaro avatar tigerfoot avatar vpicavet avatar

Watchers

 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.