Skip to content
A server to stream PostGIS 3D objects to the web
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Building server

This is a prototype for a simple web server that retrieves polyhedral surfaces from a POSTGIS database and sends them back in a glTF or GeoJSON file.

It relies on a Bounding Volume Hierarchy (BVH) to transmit progressively the geometric data. A script for building the BVH is provided in this repository.


From sources

To use building-server from sources:

$ apt-get install python3-dev
$ git clone
$ cd building-server
$ virtualenv -p /usr/bin/python3 venv
$ . venv/bin/activate
(venv)$ pip install --upgrade setuptools
(venv)$ pip install -e .

If you want to run unit tests:

(venv)$ pip install nose
(venv)$ nosetests

Generating the BVH and the tile association

./ conf/building.yml <city>

How to run

building-server has been tested with uWSGI and Nginx.

Once files building.uwsgi.yml and building.yml are well configurated for your environment, you can run the building-server:

(venv)$ pip install uwsgi
(venv)$ uwsgi --yml conf/building.uwsgi.yml
spawned uWSGI worker 1 (pid: 5984, cores: 1)

In case of the next error:

(venv)$ uwsgi --yml conf/building.uwsgi.yml
ImportError: No module named site
(venv)$ deactivate
$ . venv/bin/activate
(venv)$ uwsgi --yml conf/building.uwsgi.yml
spawned uWSGI worker 1 (pid: 5984, cores: 1)



You can’t perform that action at this time.