Skip to content
forked from tudelft3d/matahn

Download tool for AHN2 that delivers a LAZ file with the points inside a bounding box drawn by the user.

License

Notifications You must be signed in to change notification settings

squeakus/matahn

 
 

Repository files navigation

MATAHN

Download tool for AHN2 that delivers a LAZ file with the points inside a bounding box drawn by the user. Based on Flask and Openlayers 2.

Installation

MATAHN currently requires redis (http://redis.io) and postgres (http://www.postgresql.org) with postgis and the LAStools (http://rapidlasso.com/). These need to be installed first.

setting up MATAHN

The recommended way to install MATAHN is using virtualenv and pip. Assuming you have working python (2.7) installation with these utilities, run these commands:

virtualenv venv

source venv/bin/activate

pip install git+https://github.com/tudelft3d/matahn.git

Now you need to create a MATAHN configuration file for you server:

wget https://raw.githubusercontent.com/tudelft3d/matahn/master/example_matahn.cfg

mv example_matahn.cfg matahn.cfg

edit this file to match you server setup. Then create an environment variable that points to this file:

export MATAHN_SETTINGS=/path/to/matahn.cfg

creating Postgresql tables

A postgresql database is required with postgis extension enabled. To create the tables required for matahn run these statements from a python shell:

from matahn.database import init_db

init_db()

Preparing laz files

In directory with laz files.

  • adding gound class to filtered points (optional):

las2las -i g*.laz -set_classification 2 -olaz -odix _ground

  • retrieve metadata:

lasinfo -nc -nv -nmm -otxt -i *.laz

  • add index (optional):

lasindex -append -i *.laz

Importing tiles

in python shell

from matahn.tile_io import load_tiles_into_db

load_tiles_into_db('/path/to/*.laz')

Running

Assuming both redis and postgresql are up and running. Run these commands to quickly start MATAHN:

celery -A matahn.celery_app worker

python -c 'import matahn; matahn.app.run(use_reloader=False)'

Although for production use, you should use a proper WSGI server such as gunicorn.

About

Download tool for AHN2 that delivers a LAZ file with the points inside a bounding box drawn by the user.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.5%
  • JavaScript 4.6%
  • HTML 4.2%
  • CSS 1.7%