Skip to content

PermafrostDiscoveryGateway/viz-3dtiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

viz-3dtiles

A Python package for creating Cesium 3D Tilesets. This package uses a forked version of the py3dtiles Python library to convert a .shp file to a .b3dm file and creates a tileset.json to load into Cesium.

This package was developed for the Permafrost Discovery Gateway, an NSF-funded research project whose mission is to create an online platform for analysis and visualization of permafrost big imagery products to enable discovery and knowledge-generation.

Install via Conda or pip

Conda

conda env create -n viz_3d --file environment.yml
conda activate viz_3d

Pip install

  1. Create a Python 3 virtual environment:
python3 -m venv .3dtilesenv
source .3dtilesenv/bin/activate
  1. Install the requirements using pip:
pip install -r requirements.txt

Usage

  1. Create an instance of the Cesium3DTile class. Use Cesium3DTile.from_file() to process a .shp file into a .b3dm 3D model:
tile = Cesium3DTile()
tile.save_to="~/my-tilesets/lakes/"
tile.from_file(filepath="~/my-data/lakes.shp")
  1. Create an instance of the Cesium3DTileset class to contain that tile:
tileset = Cesium3DTileset(tiles=[tile])
tileset.save_to="~/my-tilesets/lakes/"
tileset.write_file()

Demo

See /test/test.py which creates an example tileset.

Usage: from the base directory (./viz-3dtiles) run python test/test.py

About

PDG vizualization pipeline for 3D Tile processing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published