Giter Site home page Giter Site logo

eduardocastanho / adaguc-viewer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from knmi/adaguc-viewer

0.0 1.0 0.0 9.53 MB

ADAGUC WMS Viewer - ADAGUC is a geographical information system to visualize netCDF files via the web. The software consists of a server side C++ application and a client side JavaScript application. The software provides several features to access and visualize data over the web, it uses OGC standards for data dissemination.

JavaScript 80.85% HTML 5.23% Shell 0.60% PHP 8.87% CSS 4.39% Dockerfile 0.05%

adaguc-viewer's Introduction

adaguc-viewer

ADAGUC WMS Viewer for visualizing OGC Web Map Services.

ADAGUC is a geographical information system to visualize netCDF files via the web. The software consists of a server side C++ application and a client side JavaScript application. The software provides several features to access and visualize data over the web, it uses OGC standards for data dissemination.

Connect adaguc-viewer to adaguc-server

This viewer is best used with adaguc-server and adaguc-services, please check https://github.com/KNMI/adaguc-server . It can browse and visualize NetCDF automatically.

Quickstart adaguc-viewer with Docker

There is a docker image available from openearth/adaguc-viewer. It can be used to install and run adaguc-viewer in minutes.

Follow these steps to get your own adaguc-viewer working:

docker pull openearth/adaguc-viewer
docker run -e ADAGUCSERVICES_AUTOWMS="http://localhost:8090/adaguc-services/autowms?" -p 8091:80 --name my-adaguc-viewer -d openearth/adaguc-viewer

Or use the following if you have started your adaguc-server with HTTPS:

docker run -e ADAGUCSERVICES_AUTOWMS="https://`hostname`:8443/adaguc-services/autowms?" -p 8091:80 --name my-adaguc-viewer -d openearth/adaguc-viewer

Visit http://localhost:8091/adaguc-viewer/

alt text

Done!

Adding the EProfile app to the adaguc-viewer docker

If you want to add the EProfile app to adaguc-viewer running in your Docker container, you should update your config file. This can be done via the following steps:

Docker exec into your adaguc-viewer container:

docker exec -it adaguc-viewer /bin/bash

Install vim such that you can edit the config file:

apt-get update
apt-get install vim

Open the config file in vim:

vim adaguc-viewer/config.js

Edit config.js by adding the following entry to the getFeatureInfoApplications array: , {name:'EProfile', iconCls:'button_getfeatureinfo', location:'apps/gfiapp_eprofile.html'}

The resulting getFeatureInfoApplications array looks for example like this:

var getFeatureInfoApplications = [
 {name:'Time series mode',iconCls:'button_getfeatureinfo',location:'apps/gfiapp_d3c3.html'}
 ,{name:'EProfile', iconCls:'button_getfeatureinfo', location:'apps/gfiapp_eprofile.html'}
 //,{name:'Glameps application',iconCls:'button_getfeatureinfo',location:'../gfiapps/GLAMEPS_gfiapp.html'}
];

If you then visit adaguc-viewer in your browser, you will have the EProfile app available in the cogwheel menu.

Developing

There are two ways to develop the adaguc-viewer. For both ways you need a webserver like apache http server or node. You can place the adaguc-viewer in the documentroot of the apache http server or use npx serve . to serve the current folder directly.

1: Use index.dev.html

Using index.dev.html uses the unminified code. Changes are directly reflected after refeshing the browser. The browser needs to support ES6 modules to be able to read the source files.

2: Use index.html and google closure compiler

The index.html uses the minfied code, build with the google closure compiler. Each time when changes to the source files are made, the closure compiler needs to be used to make the minified bundle. The google closure compiler is called from the ./builds/build.sh script.

The google closure compiler can be downloaded from: https://repo1.maven.org/maven2/com/google/javascript/closure-compiler/v20210106/closure-compiler-v20210106.jar and should be placed at the same folder level as adaguc-viewer like:

├── adaguc-viewer/
├── closure/compiler.jar

Then inside the adaguc-viewer/builds/ call bash build.sh to compile the code.

Tip: Serving the adaguc-viewer can also be accomplished by doing the command npx serve . from the adaguc-viewer folder.

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.