Code Monkey home page Code Monkey logo

asi's Introduction

Mini-Projet ASI

The aim of this project is to set up a virtual machine with two containers, the first one is the data server which contains the postgres+postgis image with an automatically added shapefile layer, and the second one is the application server which contains the geoserver image. at the end we will be able to see the Paris department shapefile from the geoserver web page, and its atribute table from the pgAdmin client interface. The schemas below show what we are attempting to do. In this project we suppose that you have already installed Vagrant. If not, please do it.

Alt text

  • Technically : diagramme logique

Step I: set up and configure the vagrant environment:

execute the appropriate script for the appropriate OS. If you are using Linux Debian/Ubuntu (run_me.sh):

  • In your home directory create a workspace folder: mkdir ~/workspace
  • move to your workspace directory: cd ~/workspace
  • clone this repository : git clone https://github.com/mohamedamjad/ASI.git
  • execute the run_me.sh script: sh ~/workspace/ASI/run_me.sh (this sh script will set up a vagrant virtual machine with the appropriate forwarded port and add the dduportal/boot2docker V1.3.1 box.

If you are Using Windows (run_me.bat):

  • create a workspace folder: mkdir workspace
  • move to your workspace folder: cd workspace
  • clone this repository : git clone https://github.com/mohamedamjad/ASI.git
  • execute the run_me.bat script: run_me.bat (this bat script will set up a vagrant virtual machine and add the dduportal/boot2docker V1.3.1 box.

Step II: pull and configure the docker containers

  • Now that you are in the boot2docker, go to the vagrant mount: cd /vagrant
  • execute the configure_docker.sh script: sh configure_docker.sh (this script will create two docker containers: postgis and geoserver the first one contains the Postgres+PostGIS image and the second one contains the Geoserver image .
  • this script will also automatically add a shapefile to our geodatabase using the shp2pgsql plugin.

Step III: Access to the geo-database from the pgAdmin desktop interface

  • Fill the connection form with the appropriate IP adress (localhost), user (postgres), Password (postgres) and forwarded port (2201) . Like the screenshot bellow. pgadmin3
  • In your public schema, you can vizualise your automatically added spatialdb table. pgadmin_table.

Step IV: Access to the geo-database from the geoserver admin web page

Now we will try to vizualise our shapefile from the geoserver admin web page.

  • First of all we need to log in into the geoserver web interface: 127.0.0.1:2207 (my 8080 port is busy). login: admin passwd: geoserver
  • to connect the geoserver container with the postgis one: Entrepôt-> Ajouter un entrepôt, and fill the form like shown in the image bellow (passwd=postgres). details de connexion.
  • If everything is OK, we need to publish our geodatabase: click Publier. connexion réussit.
  • You'll have a new form, keep the default parameters, choose : Emprise native and valdiate the form emprise
  • Final step (Haaallelujah!!): Prévisualisation des couches-> click on the name of your layer and choose OpenLayers shapefile

asi's People

Contributors

mohamedamjad avatar

Stargazers

 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.