Tofull / py3dtiles_batcher

Convert .las files to 3dtiles in batch using py3dtiles. Ease 3d vizualisation of supersized .las.
22 stars 7 forks source link
3dtiles bigdata cesiumjs itowns py3dtiles stream tileset

py3dtiles_merger

**Disclaimer:**

This project is under active development and has been created to generate data as fast as possible at Jakarto (rush time). It doesn't cover either unit test, well-written documentation, or a sufficient level of abstraction to be used in different contexts. However, I will be more than happy to remove this disclaimer when improvements will be done. Feel free to open an issue to help the project.

Convert .las files to 3dtiles in batch using py3dtiles <https://github.com/Oslandia/py3dtiles>_.

You can then easily visualize your supersized .las files on the Internet thanks to 3d viewers like Cesium <https://github.com/AnalyticalGraphicsInc/cesium> or Itowns <https://github.com/iTowns/itowns>.

Requirements #############

This project needs a docker image of py3dtiles. Please follow the instructions :

.. code-block:: shell

    $ git clone https://github.com/Tofull/py3dtiles
    $ cd py3dtiles
    $ git checkout feature/Docker_support
    $ docker build -t py3dtiles .

Installation #############

Usage ###########

.. code-block:: shell

    usage: py3dtiles_batcher [-h] [--dryrun] [--incremental] [--srs_in SRS_IN]
                     [--srs_out SRS_OUT] [--cache_size CACHE_SIZE]
                     [--docker_image DOCKER_IMAGE] [--verbose] [--norgb]
                     output_folder [input_folder [input_folder ...]]

    Convert .las file to 3dtiles in batch.

    positional arguments:
    output_folder         Directory to save tiles.
    input_folder          Directory to watch. (default: .)

    optional arguments:
        -h, --help            show this help message and exit
        --dryrun              Active dryrun mode. No tile will be generated in this
                                mode. (default: False)
        --incremental         Active incremental mode. Skip tile if
                                <output_folder>/<tile>/tileset.json exists. (default:
                                False)
        --srs_in SRS_IN       Srs in. (default: 2959)
        --srs_out SRS_OUT     Srs out. (default: 4978)
        --cache_size CACHE_SIZE
                                Cache size in MB. (default: 3135)
        --docker_image DOCKER_IMAGE
                                py3dtiles docker image to use. (default: py3dtiles)
        --verbose, -v         Verbosity (-v simple info, -vv more info, -vvv spawn
                                info) (default: 0)
        --norgb               Do not export rgb attributes (default: True)

    Working example (remove --dryrun when you want to generate tiles) :
    py3dtiles_batcher.exe "D:\data_py3dtiles\output" "D:\data_py3dtiles\raw" --dryrun -v

Examples ##########

If you want to convert all .las from "D:\data_py3dtiles\raw" directory and save result into "D:\data_py3dtiles\output":

.. code-block:: shell

    # On windows
    py3dtiles_batcher.exe -v "D:\data_py3dtiles\output" "D:\data_py3dtiles\raw"

You can select specific files or folder you want to convert:

.. code-block:: shell

    # On windows
    py3dtiles_batcher.exe -v "D:\data_py3dtiles\output" "D:\data_py3dtiles\raw" "D:\folder1\file1.las" "D:\folder2"

Notes : #############

What's next ? ##############

Contribution #############

Contributions are welcome. Feel free to open an issue for a question, a remark, a typo, a bugfix or a wanted feature.

Licence ##########

Copyright © 2018 Loïc Messal (@Tofull) and contributors

Distributed under the MIT Licence.