Giter VIP home page Giter VIP logo

building-server's Introduction

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.

Installation

From sources

To use building-server from sources:

$ apt-get install python3-dev
$ git clone https://github.com/Oslandia/building-server
$ 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

./building-server-processdb.py 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)

Example

http://localhost:9090/?query=getCities

http://localhost:9090/?query=getGeometry&city=montreal&tile=1/4/2&format=GeoJSON

building-server's People

Contributors

jeremy-gaillard avatar ldgeo avatar pblottiere avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.