Light OpenSource PointCloud Server
Python

README.md

Build Status



LOPoCS (Light Opensource PointCloud Server) is a point cloud server written in Python, allowing to load Point Cloud from Postgis thanks to the pgpointcloud extension.



The current version of LOPoCS provides a way to load Point Cloud from Postgis in:

Note that LOPoCS is currently the only 3DTiles server able to stream data from pgpointcloud. This is possible thanks to the python module py3dtiles.

Developments are still going on to improve state-of-the-art algorithms and performances.

Video

Online demonstration

Install

From sources

To use LOPoCS from sources:

$ sudo apt-get install libgdal-dev
$ git clone https://github.com/LI3DS/lopocs
$ cd lopocs
$ virtualenv -p /usr/bin/python3 venv
$ . venv/bin/activate
(venv)$ pip install --upgrade pip
(venv)$ pip install -e .
(venv)$ pip install -e "git+https://github.com/hobu/laz-perf#egg=lazperf&subdirectory=python"

If you want to run unit tests:

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

How to run

LOPoCS has been tested with uWSGI and Nginx.

Once files lopocs.uwsgi.yml and lopocs.yml are well configurated for your environment, you can run LOPoCS:

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

In case of the next error:

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

To test your installation:

$ curl http://localhost:5000/infos/online
"Congratulation, LOPoCS is online!!!"

API and Swagger

Each viewer has specific expectations and communication protocol. So, the API is built to meet these specific needs.

Currently, 2 kinds of formats are supported:

  • 3DTiles
  • Greyhound format (LAZ data with a footer indicating the number of points)

LOPoCS is able to stream data up to 3 viewers:

  • Potree viewer with the Greyhound format
  • iTowns2 with the Greyhound format
  • Cesium with the 3DTiles format

LOPoCS provides its RESTful API through a Swagger UI by default on http://localhost:5000:

There's three namespace:

  • infos: to retrieve informations about LOPoCS (contact, ...)
  • greyhound: to communicate with LOPoCS according to the Greyhound format
  • 3dtiles: to communicate with LOPoCS according to the 3DTiles format

Infos Namespace

You can retrieve simple information about LOPoCS through this namespace. There are no settings in this case, just simple query:

$ curl http://localhost:5000/infos/contact
"infos+li3ds@oslandia.com"

Greyhound Namespace

The greyhound namespace provides 3 points of entry:

  • info: returns information about the dataset served by the server in JSON
  • hierarchy: returns the description of the dataset according to an octree in JSON
  • read: returns points in LAZ format

3DTiles Namespace

The 3dtiles namespace provides 2 points of entry:

  • info: returns information about the dataset in JSON
  • read.pnts: returns points in 3DTiles Point Cloud format

License

LOPoCS is distributed under LPGL2 or later.