Skip to content

An extension of the pygeoapi to serve various urban models

License

Notifications You must be signed in to change notification settings

citysciencelab/urban-model-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Urban Model Server_Banner

Urban Model Server

This is a modified instance of the pygeoapi that can act as a server to host various urban models. It extends the functionalities of the pygeopai with a Websocket implementation. Different microservices/processes can connect with the pygeoapi via Websockets. The processes are then dynamically stored in the Urban Model Server instance and can be executed under the specific /processes/<process-id>/execution endpoint. A job ID is created as usual and once the calculations are finished, the results are transferred back from the Microservices and stored under the /jobs/<job-id>/results endpoint.

It is thus possible to connect multiple processing microservices with the Urban Model Server as long as the SOCKETAPP CORS settings allow for it. The microservices can be written in different programming languages and Dockerized environments with their respective packages. Dependency conflicts can thus be resolved.

The architecture of the Urban Model Server looks as following:

Urban Model Server Architektur

Development Setup

To start the pygeoapi in local development mode, follow these steps

  1. Create a virtual environment in Python with python3 -m venv urbanmodelserver
  2. Navigate to the new environment with cd urbanmodelserver and activate it with . bin/activate
  3. Clone or download this repository
  4. Navigate into the repository with cd urban-model-server and install the requirements with pip3 install --upgrade pip and pip3 install -r requirements.txt
  5. Run the Setup file with python3 setup.py install
  6. Adjust the config-dev.yml file as necessary
  7. Set the environment variables with export PYGEOAPI_CONFIG=config-dev.yml and export PYGEOAPI_OPENAPI=example-openapi.yml
  8. Generate the openapi config file by running pygeoapi openapi generate $PYGEOAPI_CONFIG > $PYGEOAPI_OPENAPI
  9. To start the development setup, run pygeoapi serve

Production Setup

Make sure to have Docker and Docker Compose installed, adjust the production settings in the config-prod.yml file and simply run docker-compose up.

⚠️ The current version of the Urban Model Server is still a prototype. If you want to use it in production, please carefully check for any possible security concerns.

pygeoapi

DOI Build Docker Vulnerabilities

pygeoapi is a Python server implementation of the OGC API suite of standards. The project emerged as part of the next generation OGC API efforts in 2018 and provides the capability for organizations to deploy a RESTful OGC API endpoint using OpenAPI, GeoJSON, and HTML. pygeoapi is open source and released under an MIT license.

Please read the docs at https://docs.pygeoapi.io for more information.

About

An extension of the pygeoapi to serve various urban models

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.4%
  • HTML 5.2%
  • Other 0.4%