https://github.com/tofull/py3dtiles_merger
A tool to merge independant 3dtiles to ease vizualization of big 3d data on Cesium or Itowns
https://github.com/tofull/py3dtiles_merger
3dtiles bigdata cesiumjs itowns py3dtiles stream tileset
Last synced: about 1 year ago
JSON representation
A tool to merge independant 3dtiles to ease vizualization of big 3d data on Cesium or Itowns
- Host: GitHub
- URL: https://github.com/tofull/py3dtiles_merger
- Owner: Tofull
- Created: 2018-07-26T18:42:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-12T19:20:25.000Z (over 6 years ago)
- Last Synced: 2024-04-24T02:53:38.650Z (about 2 years ago)
- Topics: 3dtiles, bigdata, cesiumjs, itowns, py3dtiles, stream, tileset
- Language: Python
- Size: 2.05 MB
- Stars: 27
- Watchers: 4
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
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.
A tool to merge independant 3dtiles to ease visualization of big 3d data on `Cesium `_ or `Itowns `_.
The 3dtiles must have been generated in the same format than `py3dtiles `_ output (branch `lasTo3dtiles` until it's merged).
py3dtiles_merger generate a `tileset.json` file which points to some `tileset.json` children respecting the `3dtiles external tilesets referencing specification
`_.
.. image:: doc/assets/py3dtiles_merger.png
:width: 200px
:align: center
:height: 100px
:alt: py3dtiles_merger schema
Installation
#############
- Local installation *(recommended until the project support pypi integration)*
.. code-block:: shell
git clone https://github.com/Tofull/py3dtiles_merger
cd py3dtiles_merger
pip install .
Usage
###########
To merge `/tileset.json` into one global `tileset.json`, use:
.. code-block:: shell
# On windows
py3dtiles_merger.exe -v -r D:/data_py3dtiles/output_merged
What's next ?
############
Once you have generated the global tileset.json, you can expose it over the Internet with any http server, like :
.. code-block:: shell
# using https://www.npmjs.com/package/http-server
npm install http-server -g
http-server D:/data_py3dtiles/output_merged --cors -p 8080
Then, your tileset is available over the Internet, and you can visualize it using 3d viewer, for example Cesium sandcastle :
1. Go to https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/index.html
2. Insert the following code on Javascript Code section :
.. code-block:: javascript
var viewer = new Cesium.Viewer('cesiumContainer');
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url : 'http://127.0.0.1:8080/tileset.json'
}));
3. Click Run (or F8) and enjoy.
.. image:: doc/assets/example_3dtiles_on_cesium.png
:width: 200px
:align: center
:height: 100px
:alt: Example on cesium
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.