Skip to content

mdahwireng/GIS_enabled_digital_library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demonstration of a GIS enabled digital Library using Docker, PostgreSQL, PostGIS and Adminer

Navigation

Directory Structure

Data

This directory contains the data to be uploaded into the digital library

Db

This directory contains the sql codes (init.sql) that needs to be executed at the initialization of the Postgres docker container

Images

This directory contains the image data model.

Test

This directory contains scripts for testing.

Introduction

A firm wants a brief demo on the processes of building a GIS enabled digital library and the benefits they can gain from having such an infrastrature.

This project seeks to achieve the following

  1. Design a simple GIS enabled database
  2. Simulate a cloud database with a docker container
  3. Provide a graphic user interface (gui) for visual interactions with the cloud database
  4. Establish a connection betwwen the database in the docker container and user machine
  5. Populate the database using a Dockerfile and a python script
  6. Create a database service to which open source GIS tools can connect and access content
  7. Run a script to execute a query which answers a GIS related question

Designed model



Setup

Docker must be installed before this project can be run. This project was built on Ubuntu therefore the terminal scripts will not run on a non unix os. It is recommended that it is ran on a ubuntu

Clone the repository and create a pthon virtual environment.

There is a point in the demo.py script where a .shp file is loaded into the digital library. This will not be possible if you dont have PostGIS installed. This is because it uses shp2pgsql, a command line tool that comes with PostGIS.

Run the code below in the terminal in the home directory of the repository to build and start the docker containers with PostgreSQL and PostGIS to simulate the cloud digital library service

docker-compose up -d --build

Follow this up with the codes bellow.

The output answers the question,

How many restaurants (franchises) are within a distance of one mile from the principal streets of U.S.A?

pip install -r requirements.txt
python demo.py

GUI for Digital Library

An Adminer docker container is provided for visual interactions with the digital library. Enter the link below in a browser after going through all the above processes.

http://localhost:8080/

This will ask for login credentials. Enter the credentials below

system : PostgreSQL
server : database
username : docker
password : docker
database : exampledb

QGIS Connection

QGIS can also be connected to the digital library and display shape files from the library. This allows easy access and distribution of data in the Digital Library. ArcGIS can also be connected to the digital library. The details for creating a connection to the library is found below

service : database
host : 0.0.0.0
database: exampledb
username : docker
password : docker

About

A GIS enabled digital library using PostgreSQL and Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages