Coder Social home page Coder Social logo

lopocs's Introduction

Light Opensource logo PointCloud Server

Build status of the master branch Package license

LOPoCS is a point cloud server written in Python, allowing to load Point Cloud from a PostgreSQL database thanks to the pgpointcloud extension.

The current version of LOPoCS provides a way to load Point Cloud from PostgreSQL to the following viewers:

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

Example using 3Dtiles/Cesium with data from GrandLyon

docs/grandlyon.png

1   Main features

  • Command line tool to load data into PostgreSQL
  • Swagger API
  • Stream patches stored in PostgreSQL
  • Greyhound protocol support
  • 3DTiles standard support (partial)
  • Produce ready to use examples with Potree and Cesium

2   Installation

2.1   Dependencies

Note

The LOPoCS loader uses PDAL's "mortonorder" filter in "reverse" mode. The "reverse" mode was introduced in PDAL version 1.7.1, so make sure you use this version or higher.

2.2   From sources

$ git clone https://github.com/Oslandia/lopocs
$ cd lopocs
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
(venv)$ pip install 'numpy==1.14.3'
(venv)$ pip install -e .

3   Configuration

You will find an example of a configuration file for lopocs in conf/lopocs.sample.yml

You have to copy it to conf/lopocs.yml and fill with your values, lopocs will load it if this file exists. Another alternative is to set up the LOPOCS_SETTINGS environment variable to locate your configuration file.

4   Usage

4.1   Prepare database

$ createdb lopocs
$ psql -d lopocs -c 'create extension postgis'
$ psql -d lopocs -c 'create extension pointcloud'
$ psql -d lopocs -c 'create extension pointcloud_postgis'
$ psql -d lopocs -c 'create extension morton'

4.2   Lopocs CLI

You can invoke lopocs in your virtualenv to show help and list available subcommands

$ cd lopocs
$ source venv/bin/activate
(venv)$ lopocs

4.3   Check installation

(venv)$ lopocs check
Pdal ... 1.4.0
Pdal plugin pgpointcloud ... ok
PostgreSQL ... 9.6.3
PostGIS extension ... 2.3.1
PgPointcloud extension ... 1.1.0
PgPointcloud-PostGIS extension ... 1.0

4.4   Demo data

(venv)$ mkdir demos
(venv)$ lopocs demo --work-dir demos/ --sample airport --cesium
(venv)$ lopocs serve

Copy/Paste the link at the end of the log in your browser and you will be able to see this:

docs/airport.png

4.5   Swagger API

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 2 viewers:

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

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

docs/api.png

5   Run tests

(venv)$ pip install .[dev]
(venv)$ py.test

6   Licence

LGPL>2: LICENSE.

lopocs's People

Contributors

autra avatar delhomer avatar elemoine avatar jeremy-gaillard avatar ldgeo avatar pblottiere 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.