CityTiler is a tool to convert CityGML files to 3D Tiles.
CityTiler requires the installation of the following tools:
$ virtualenv -p /usr/bin/python3 venv
$ . venv/bin/activate
(venv)$ pip install -e .
CityTiler uses a version of py3dtiles that has not yet been published. You will need to install it manually.
$ git clone https://github.com/jeremy-gaillard/py3dtiles/
$ cd py3dtiles
$ git checkout bt_hierarchy
# Move back to CityTiler directory
$ pip install path/to/py3dtiles --upgrade
Open conf/config.yml and fill in the undefined fields.
The full documentation of the different parameters is available via the command line interface:
(venv)$ python citytiler/citytiler.py -h
Here are a few examples of how you can use the exporter. The CityGML file used in these examples is available on the Grand Lyon open data website.
If you want to export a CityGML file without having to create and populate the database yourself:
(venv)$ python citytiler/citytiler.py conf/config.yml citytiler 3946 crs:EPSG::3946 --files 'VILLEURBANNE_2015/VILLEURBANNE_BATI_2015.gml' --output './tilesets'
If you want to export the content of a database that uses the 3D City DB scheme:
(venv)$ python citytiler/citytiler.py conf/config.yml citytiler --output './tilesets'
If you want to add new data to a database that uses the 3D City DB scheme and export it :
(venv)$ python citytiler/citytiler.py conf/config.yml citytiler --files 'VILLEURBANNE_2015/VILLEURBANNE_BATI_2015.gml' --output './tilesets' --append