Giter Site home page Giter Site logo

geosmartcity-cip / vmm-gsc-crowdsourcing-client Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 41 KB

A client application for the geosmartcity crowdsource api (https://github.com/GeoSmartCity-CIP/crowd-sourcing)

JavaScript 67.06% HTML 30.49% Batchfile 2.45%

vmm-gsc-crowdsourcing-client's Introduction

Crowdsource application for VMM

A client application for the geosmartcity crowdwsource api (https://github.com/GeoSmartCity-CIP/crowd-sourcing).

The geosmartcity frontend library, openlayers3 and the tink-toolkit are used to create this application.

Prerequisites

This application requires the The geosmartcity crowdsourcing backend to install this application, you can follow steps outlined below:

Install tomcat (webserver) and postgis (database)

Installers Windows:

Linux using apt:

sudo apt-get install tomcat7
sudo service tomcat7 start 
sudo apt-get install postgresql postgresql-contrib

download the schema of the databse from: https://github.com/GeoSmartCity-CIP/crowd-sourcing/raw/master/server/db-schema/crowd-sourcing.backup create the db and roles in postgis (on localhost):

createuser --createdb --login --createrole --pwprompt --superuser rszturc
createuser --login --pwprompt cs
createdb -T template0 cs 
psql -c "CREATE EXTENSION postgis;" cs 
psql -c "CREATE EXTENSION postgis_topology;" cs 
pg_restore -C -d  cs ../crowd-sourcing.backup

Download the backend as war-file: https://github.com/GeoSmartCity-CIP/crowd-sourcing/releases/download/v1.7/CrowdSourcing.war Load the crowd-sourcing backend into tomcat: http://localhost:8080/manager/html Configure the application:

  • edit: [apache-tomcat-home]\webapps\CrowdSourcing\WEB-INF\web.xml

     ...
       <context-param>
         <param-name>db-url</param-name>
         <param-value>jdbc:postgresql://localhost:5432/cs</param-value>
       </context-param>
       <context-param>
         <param-name>db-user</param-name>
         <param-value>rszturc</param-value>
       </context-param>
       <context-param>
         <param-name>db-password</param-name>
         <param-value>123</param-value>
       </context-param>
     ...
  • edit or create: [apache-tomcat-home]\webapps\CrowdSourcing\META-INF\context.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <Context allowCasualMultipartParsing="true" ></Context>

Build this application

If you need to install this app on a java-application server like tomcat, you can download the war-file instead.

Install nodejs: https://nodejs.org , on windows use the node cmd-prompt for the next actions:

Clone this repo, install bower and grunt and the dependencies defined in package.json and bower.

git clone https://github.com/warrieka/VMM_crowdsource_client
npm install bower -g
npm install grunt -g
npm install 
bower install 

Then build the application using grunt:

grunt build

The folder /build will be created and contain a .war-file to deploy to the tomcat webserver. The folder /public will contain the application in unpackaged form.

Configure this application

Before you can use the application you need to specify some configuration parameters. All parameters are required.

  • title: A name for the application, free to choose.
  • csurl: The full path to the Crowdsource backend, do not use a relative path here.
  • layers: An array of objectjs containing WMS-layers for this project.
    • name: The name of the WMS-layer in the legend.
    • url: The url of the WMS, do not include the part after the "?".
    • wmslayers: An array of the names and id's of the internal layers of the WMS you want to include in the application.

Example:

{
  "title": "De Rioolnetwerk crowdsource app",
  "csurl": "http://localhost:8080/CrowdSourcing",
  "layers": [{
      "name": "Rioolnetwerk" , "type": "wms", "visibile": true, 
      "url": "//geoservices.informatievlaanderen.be/raadpleegdiensten/VMM/wms",
      "wmslayers": [{"name":"Hydropunt",  "id":"HYDPNT"}, 
                    {"name":"Streng",     "id":"STRENG"}, 
                    {"name":"Koppelpunt", "id":"KOPPNT"}]
    } , {
      "name": "mercatorNet", "type":"wms", "visibile": false, 
      "url": "//www.mercator.vlaanderen.be/raadpleegdienstenmercatorpubliek/ows",
      "wmslayers": [{"name": "Habitat gebied", "id":"ps:ps_hbtrl"}]
    }]
}

vmm-gsc-crowdsourcing-client's People

Contributors

warrieka avatar

Watchers

 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.