Skip to content

UAV-GeoLAB/MAP-Network-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graph Analysis On Street Network In A Web Browser

The tool is a prototype system for comparing spatial layouts in ancient cities. It allows to conduct simple GIS operations in a web browser (digitizing and georeferencing data) and then perform network analysis (Networkx and SpaceSyntax analyses) on input data.

Example screenshots from application: (the source of the base map: Hoepfner and Schwandner, 1994)

  • Digitization of street network:

alt text

  • Georeferencing:

alt text

  • Showing results of network analysis:

alt text

Dependencies:

Architecture

alt text Description of components:

  • Server side
    • Image API – IIIF API/image server responsible for sharing images and interactively displaying raster images with deep zoom,
    • Database – stores digitized, georeferenced data (input data from user) and results of network analysis,
    • API – allows communication with database and docker container for Space Syntax analysis.
  • Client side (Web Browser) consists of three main components
    • Digitalization of street network,
    • Georeferencing (acquisition of Ground Control Points),
    • Displaying results of network analyses with possiblity to download them in GIS format (Shapefile).

Deployment

To deploy application, you need to install and setup a few components. Steps below are describing way of deployment the system on localhost.

IIIF image server - Cantaloupe

Download Cantaloupe v5.0.5 from https://github.com/cantaloupe-project/cantaloupe/releases. Specify directory path for storing images in cantaloupe.properties and run server (according to instruction provided in the link above). Specify above path as well in API/main.py as the value of variable:

IMAGE_DIR = r'\path\to\images'  # Image directory path served by IIIF server

Database – PostgreSQL

Download PostgreSQL from https://www.postgresql.org/download/. Remember the password specified during installation! Please download also PostGIS extension for PostgreSQL - you can do it from StackBuilder application

After installation, create database which will store digitized, georeferenced street networks and results of network analysis. You can do it using Postgres GUI application – pgAdmin.

After you setup database, please specify database parameters in API/db_params.py. Finally, add path of Postgres bin directory (with Postgis files) to environment variable PATH. In this bin folder there will be GDAL/OGR dependencies necessary in our application.

API – Python and FastAPI

You need Python 3.7+. Change directory to API and install all Python libraries (dependencies) at right versions using:

pip install -r requirements.txt

Then run API server using:

uvicorn main:app

SpaceSyntax Docker

Download docker files from: https://github.com/UAV-GeoLAB/space-syntax-for-MAP-project/tree/0a9e7a1243f05844e4a86a3c41df6ad67ad0eef2. It is docker from https://github.com/digitalcityscience/space-syntax, adopted for our application.

After downloading docker files and changing to its root folder, build the SpaceSyntax Docker container with tag space_syntax:

docker build --tag space_syntax .

HTML and Javascript code

Please download source code of Leaflet and its plugins:

Extract above files in static directory.

Further configuration

In static/urls.js you can change adresses of FastAPI and Cantaloupe server (if you want use these services on non-localhost adresses). You can also change paths for html files:

// Urls for static files (needed during deploymend)
var API_URL = "http://127.0.0.1:8000/" // localhost
var IIIF_URL = "http://127.0.0.1:8182/iiif/3/" // localhost
var EDITOR_URL = "./editor.html"
var VIEWER_URL = "./viewer.html"
var VIEWER_SS_URL = "./viewer_spacesyntax.html"
var GEOREFERENCE_URL = "./georeference.html"

Funding

This work was supported by the National Science Centre (NCN), Poland as a part of MA-P Maloutena and Agora in the layout of Paphos: Modelling the cityscape of the Hellenistic and Roman capital of Cyprus project, OPUS 18 grant No. 2019/35/B/HS3/02296.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published