{"id":22428030,"url":"https://github.com/vcityteam/py3dtilers","last_synced_at":"2025-05-16T13:08:07.780Z","repository":{"id":37804827,"uuid":"372892788","full_name":"VCityTeam/py3dtilers","owner":"VCityTeam","description":"Tilers accepting various input formats (OBJ, 3DCity databases, GeoJson, IFC) and producing 3DTiles tilesets.","archived":false,"fork":false,"pushed_at":"2025-03-28T12:50:30.000Z","size":68254,"stargazers_count":224,"open_issues_count":55,"forks_count":60,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-29T15:33:30.146Z","etag":null,"topics":["3d-tiles","3dcitydb","3dtiles","b3dm","citygml","geojson","ifc","obj","open-source","opensource","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VCityTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-01T16:19:37.000Z","updated_at":"2025-04-29T02:18:34.000Z","dependencies_parsed_at":"2024-12-13T18:08:22.866Z","dependency_job_id":"d95fdd97-e82e-4c1c-93b0-b8361ce2fed1","html_url":"https://github.com/VCityTeam/py3dtilers","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VCityTeam%2Fpy3dtilers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VCityTeam%2Fpy3dtilers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VCityTeam%2Fpy3dtilers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VCityTeam%2Fpy3dtilers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VCityTeam","download_url":"https://codeload.github.com/VCityTeam/py3dtilers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254535829,"owners_count":22087399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-tiles","3dcitydb","3dtiles","b3dm","citygml","geojson","ifc","obj","open-source","opensource","python"],"created_at":"2024-12-05T20:13:35.047Z","updated_at":"2025-05-16T13:08:07.761Z","avatar_url":"https://github.com/VCityTeam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Py3DTilers: an open-source toolkit to create 3DTiles\n\n## :warning: Arrested development :warning:\n\nAlas, starting on January 2025, the current Py3dTilers development team will move on to new projects. Py3dTilers will thus no longer be developed nor maintained.\nThe **current repository owners are thus looking for a community** (a set of individuals, teams or corporations) that would be willing to adopt py3dTilers in order to pursue the development activity.\nThis transition could take the form of adding new developers and transmitting the MAINTAINER role (at the repository level).\nBut, as allowed by the [LICENSE](https://github.com/VCityTeam/py3dtilers/blob/master/LICENSE.md), the transmission could go as far as relinquishing the repository ownership to another responsible organization.\n\nAt this stage, some contacts were made with some public or private organizations (currently using and/or contributing to py3dTilers). If the future of py3dTilers interests you, and you would willing to engage some resources to take the lead on \nmaintaining/developing py3dTilers, please provide [in this issue](https://github.com/VCityTeam/py3dtilers/issues/196) some sketchy declaration of intention and possibly a coarse roadmap.\n\nDeciding the actual form of transmission will be based on the result of the public discussion happening [in this issue](https://github.com/VCityTeam/py3dtilers/issues/196).\n\n---\n\n[![Build Status](https://app.travis-ci.com/VCityTeam/py3dtilers.svg?branch=master)](https://app.travis-ci.com/VCityTeam/py3dtilers)\n[![Documentation Status](https://readthedocs.org/projects/ansicolortags/badge/?version=latest)](https://vcityteam.github.io/py3dtilers/py3dtilers/index.html)\n\n[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-3918/) [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-31013/) [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3116/) [![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3124/)\n\nPy3DTilers is a Python tool and library allowing to build [`3D Tiles`](https://github.com/CesiumGS/3d-tiles) tilesets out of various geometrical formats e.g. [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file), [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON), [IFC](https://en.wikipedia.org/wiki/Industry_Foundation_Classes) or [CityGML](https://en.wikipedia.org/wiki/CityGML) through [3DCityDB databases](https://3dcitydb-docs.readthedocs.io/en/release-v4.2.3/).\n\nPy3DTilers uses [`Py3DTiles` python library](https://gitlab.com/py3dtiles/py3dtiles) for its in memory representation of tilesets.\n\nPy3DTilers can only produce [`Batched 3D Models (B3DM)`](https://github.com/CesiumGS/3d-tiles/blob/main/specification/TileFormats/Batched3DModel/README.md). If you want to produce [`Point Clouds (PNTS)`](https://github.com/CesiumGS/3d-tiles/blob/main/specification/TileFormats/PointCloud/README.md), see [Py3DTiles CLI](https://gitlab.com/py3dtiles/py3dtiles/-/blob/master/docs/cli.rst).\n\nAn article that presents the tool is available in the ISPRS annals [here](https://hal.science/hal-03852828/).  \n\n## Demo\n\nFind 3D Tiles created with Py3DTilers in [**this online demo**](https://projet.liris.cnrs.fr/vcity/permalink/demo-py3dtilers.html).\n\n## CLI Features\n\n- [Common features](./py3dtilers/Common#common-module): features shared by all tilers\n- [ObjTiler](./py3dtilers/ObjTiler#obj-tiler): converts OBJ files to a 3D Tiles tileset\n- [GeojsonTiler](./py3dtilers/GeojsonTiler#geojson-tiler): converts GeoJson files to a 3D Tiles tileset\n- [IfcTiler](./py3dtilers/IfcTiler#ifc-tiler): converts IFC files to a 3D Tiles tileset\n- [CityTiler](./py3dtilers/CityTiler#city-tiler): converts CityGML features (e.g buildings, water bodies, terrain...) extracted from a 3dCityDB database to a 3D Tiles tileset\n- [TilesetReader](./py3dtilers/TilesetReader#tileset-reader): read, merge or transform 3DTiles tilesets\n\n## Installation from sources\n\nSee [supported Python versions](#py3dtilers-an-open-source-toolkit-to-create-3dtiles)\n\n### For Unix\n\nInstall binary sub-dependencies with your platform package installer e.g. for Ubuntu use\n\n```bash\napt-get install -y libpq-dev       # required usage of psycopg2 within py3dtilers\napt-get install python3 python3-dev\n```\n\nInstall Py3DTilers in a safe [python virtual environment](https://docs.python.org/3/tutorial/venv.html) (not mandatory yet quite recommended)\n\n```bash\napt-get install virtualenv git\ngit clone https://github.com/VCityTeam/py3dtilers\ncd py3dtilers\nvirtualenv -p python3 venv\n. venv/bin/activate\n(venv)$ pip install -e .\n```\n\n### For Windows\n\nIn order to install Py3DTilers from sources use:\n\n```bash\ngit clone https://github.com/VCityTeam/py3dtilers\ncd py3dtilers\npython3 -m venv venv\n. venv/Scripts/activate\n(venv)$ pip install -e .\n```\n\n## Usage\n\nIn order to access to the different flavors of tilers, refer to the corresponding readmes to discover their respective usage and features:\n\n- Common features [readme](py3dtilers/Common/README.md)\n- CityTiler [readme](py3dtilers/CityTiler/README.md)\n- GeojsonTiler [readme](py3dtilers/GeojsonTiler/README.md)\n- ObjTiler [readme](py3dtilers/ObjTiler/README.md)\n- IfcTiler [readme](py3dtilers/IfcTiler/README.md)\n- TilesetReader [readme](py3dtilers/TilesetReader/README.md)\n\nUseful tutorials:\n\n- [CityTiler usage example](./docs/Doc/cityGML_to_3DTiles_example.md)\n- [GeojsonTiler usage example](./docs/Doc/geoJSON_to_3DTiles_example.md)\n- [Visualize 3DTiles in Cesium, iTowns or UD-Viz](https://github.com/VCityTeam/UD-SV/blob/master/ImplementationKnowHow/Visualize3DTiles.md)\n- [Create 3DTiles from OpenStreetMap data](https://github.com/VCityTeam/UD-SV/blob/master/ImplementationKnowHow/OSM_to_3DTiles.md)\n- [Host CityGML data in 3DCityDB](https://github.com/VCityTeam/UD-SV/blob/master/ImplementationKnowHow/PostgreSQL_for_cityGML.md)\n\n## Develop with Py3DTilers\n\nBefore commiting, please [run tests](#running-the-tests) and make sure [coding style](#coding-style) is respected.\n\n### Running the tests\n\nAfter the installation, if you additionally wish to run unit tests, use\n\n```bash\n(venv)$ pip install -e .[dev,prod]\n(venv)$ pytest\n```\n\nTo run CityTiler's tests, you need to install PostgreSQL and Postgis.\n\nTo setup PostgreSQL with Postgis on Windows, follow the first step (1. Download PostgreSQL/PostGIS) of [3DCityDB tutorial](https://github.com/VCityTeam/UD-SV/blob/master/ImplementationKnowHow/PostgreSQL_for_cityGML.md#1-download-postgresqlpostgis).  \nFor Ubuntu, follow [this tutorial](https://github.com/VCityTeam/UD-SV/blob/master/Install/Setup_PostgreSQL_PostGIS_Ubuntu.md).\n\n### Coding style\n\nFirst, install the additional dev requirements\n\n```bash\n(venv)$ pip install -e .[dev]\n```\n\nTo check if the code follows the coding style, run `flake8`\n\n```bash\n(venv)$ flake8 .\n```\n\nYou can fix most of the coding style errors with `autopep8`\n\n```bash\n(venv)$ autopep8 --in-place --recursive py3dtilers/\n```\n\nIf you want to apply `autopep8` from root directory, exclude the _venv_ directory\n\n```bash\n(venv)$ autopep8 --in-place --exclude='venv*' --recursive .\n```\n\n### Developing Py3DTilers together with py3dtiles\n\nBy default, the Py3DTilers' [`setup.py`](https://github.com/VCityTeam/py3dtilers/blob/master/setup.py#L30) build stage uses [github's version of py3dtiles](https://github.com/VCityTeam/py3dtiles) (as opposed to using [Oslandia's version on Pypi](https://pypi.org/project/py3dtiles/).\nWhen developing one might need/wish to use a local version of py3dtiles (located on host in another directory e.g. by cloning the original repository) it is possible\n\n1. to first install py3dtiles by following the [installation notes](https://github.com/Oslandia/py3dtiles/blob/master/docs/install.rst)\n2. then within the Py3DTilers (cloned) directory, comment out (or delete) [the line reference to py3dtiles](https://github.com/VCityTeam/py3dtilers/blob/master/setup.py#L30).\n\nThis boils down to :\n\n```bash\n$ git clone https://github.com/VCityTeam/py3dtiles\n$ cd py3dtiles\n$ ...\n$ source venv/bin/activate\n(venv)$ cd ..\n(venv)$ git clone https://github.com/VCityTeam/py3dtilers\n(venv)$ cd py3dtilers\n(venv)$ # Edit setup.py and comment out py3dtiles reference\n(venv)$ pip install -e .\n(venv)$ pytest\n```\n\n### Concerning CityTiler\n\n- For developers, some [design notes](docs/Doc/CityTilerDesignNotes.md)\n- Credentials: CityTiler original code is due to Jeremy Gaillard (when working at LIRIS, University of Lyon, France)\n\n### Configuring your IDE\n\nWhen configuring your IDE to run a specific tiler, you must indicate the module you want to run (e.g. py3dtilers.CityTiler.CityTiler) and not the path to the file (i.e. not ${workspace_root}/py3dtilers/CityTiler/CityTiler.py), otherwise python will not be able to resolve the relative import of the Tilers to the Common package of Py3DTilers. An example of launch configuration in VSCode:\n\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"name\": \"\u003claunch_config_name\u003e\", // e.g. \"CityTiler\" or \"bozo\"\n      \"type\": \"python\",\n      \"request\": \"launch\",\n      \"module\": \"\u003ctiler_module\u003e\", // e.g. py3dtilers.CityTiler.CityTiler\n      \"args\": [\n        \"--db_config_path\",\n        \"${workspaceRoot}/py3dtilers/CityTiler/\u003cmy_config_file.yml\u003e\"\n      ],\n      \"console\": \"integratedTerminal\"\n    }\n  ]\n}\n```\n\n### Profiling\n\nPython standard module [cProfile](https://docs.python.org/3/library/profile.html) allows to profile Python code.\n\n#### **In code**\n\nImport modules:\n\n```python\nimport cProfile\nimport pstats\n```\n\nProfile the code between `enable()` and `disable()`:\n\n```python\ncp = cProfile.Profile()\ncp.enable()  # Start profiling\n\n# code here\n\ncp.disable()  # Stop profiling\np = pstats.Stats(cp)\np.sort_stats('tottime').print_stats()  # Sort stats by time and print them\n```\n\n#### **In command line**\n\ncProfile can be run in the shell with:\n\n```bash\npython -m cProfile script.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvcityteam%2Fpy3dtilers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvcityteam%2Fpy3dtilers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvcityteam%2Fpy3dtilers/lists"}