Skip to content

d2hydro/hydrobase

Repository files navigation

Hydrobase

Hydrobase is a Ribasim viewer developed by D2Hydro. It runs at https://hydrobase.nl/ribasim.

Workings

This app uses a GeoServer instance in the backend to serve a GeoPackage based on the Ribasim model database. The model must therefore be placed on the server, typically this will be the Dutch national LHM model schematization from Ribasim-NL. The /web/app.py defines several endpoints using FastAPI to display more model data.

Run locally

Running hydrobase locally is mainly meant for developers of the application.

  1. Install Pixi.
  2. Install a Java (JRE) that is compatible with GeoServer.
  3. Install GeoServer, noting the GEOSERVER_DATA_DIR.
  4. Copy the contents of the geoserver directory in this repository over the GEOSERVER_DATA_DIR.
  5. Create a directory d:\hydrobase_data\lhm\ and place the current version of the Ribasim LHM model there. This consists of two files, lhm.toml and database.gpkg. This directory is referenced in geoserver/workspaces/ribasim/ribasim/datastore.xml, as well as the config.py of the next step.
  6. Create a file /web/config.py with these contents:
    from pathlib import Path
    GEOSERVER_URL = "http://localhost:8080"
    APP_URL = "http://localhost:3000"
    DATA_DIR = Path(r"d:/hydrobase_data")
    
    If you run GeoServer on a different port, change it here.
  7. Run the app with pixi run app or equivalently run /serve_app.cmd. This will create a modified GeoPackage next to database.gpkg called geoserver_layers.gpkg with layers more suitable for visualization with the current GeoServer workspace.
  8. Open the locally hosted app at http://localhost:3000.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •