Skip to content

NLeSC/ahn-pointcloud-viewer

Repository files navigation

AHN2 point cloud viewer

Build Status Code Climate Test Coverage DOI

Point cloud visualization of the current digital elevation model of the Netherlands (Actueel Hoogtebestand Nederland or AHN2). For further details, please refer to the publication by Martinez-Rubi et al. (2015).

Willemstad in the AHN2 viewer

Related repositories

Prerequisites

Installation: Windows

Install Node.js and required modules

  • Make sure the Add node to PATH option is checked.
  • Create '$HOME/npm' folder (where $HOME is C:\Users<username>\AppData\Roaming).

npm install -g bower grunt-cli

Install Ruby and required package

  • Make sure the Add Ruby to PATH option is checked

gem install compass

Install AHN2 viewer

git clone https://github.com/NLeSC/ahn-pointcloud-viewer
cd ahn-pointcloud-viewer
npm install -g grunt grunt-cli
npm install
bower install
bower update

Test AHN2 viewer

grunt serve # starts the web server and opens http://localhost:9000 in your browser

Installation: Debian/Ubuntu-based Linux distros

Install Node.js and required modules

See the documentation here.

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g bower grunt-cli

Install Ruby and required package

sudo apt-get install ruby-dev libffi-dev build-essential
sudo gem install compass

Install AHN2 viewer

git clone https://github.com/NLeSC/ahn-pointcloud-viewer
cd ahn-pointcloud-viewer
npm install phantomjs
npm install
bower install
#bower update

Test AHN2 viewer

grunt serve # starts the web server and opens http://localhost:9000 in your browser

Run unit tests

grunt test

Note: This generates test and coverage reports (see the test/reports folder).

Run end-to-end tests locally

grunt e2e-local

Note: Both the point cloud and minimap use a canvas and can't be tested automatically so they must be verified manually using the screenshots in the report (open e2e/reports/report.html in your browser).

Run end-to-end tests remotely on Sauce Labs

Connect to Sauce Labs using the sauce-connect program. Further details on how to install and run this tool can be found here.

Setup Sauce Labs credentials before running the tests.

export SAUCE_USERNAME=<your sauce labs username>
export SAUCE_ACCESS_KEY=<your sauce labs access key>

Run the tests in Google Chrome (Linux).

grunt e2e-sauce

Both the point cloud window and minimap use a canvas, which can't be tested automatically. Therefore, the tests must be verified manually using the screencast in the report at https://saucelabs.com/u/<your sauce labs username>.

Also Travis-CI runs end-to-end tests on Sauce Labs.

Note: Executing grunt e2e-sauce locally will undo all changes in app/ folder.

Build a distro

grunt build

The dist folder has production ready distribution.

Generate API documentation

grunt jsdoc

API documentation is generated in doc/ directory.

Frame rate report

Use Chrome FPS plotting to get the frame rate.

  1. Open developer tools
  2. On Console tab goto Rendering tab (bottom screen)
  3. Check the Show FPS meter checkbox

Deploy to GitHub pages

Deploy distribution to gh-pages branch. Make it available as http://nlesc.github.io/ahn-pointcloud-viewer

grunt build
grunt gh-pages