Hydrobase is a Ribasim viewer developed by D2Hydro. It runs at https://hydrobase.nl/ribasim.
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.
Running hydrobase locally is mainly meant for developers of the application.
- Install Pixi.
- Install a Java (JRE) that is compatible with GeoServer.
- Install GeoServer, noting the GEOSERVER_DATA_DIR.
- Copy the contents of the
geoserver
directory in this repository over the GEOSERVER_DATA_DIR. - 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
anddatabase.gpkg
. This directory is referenced ingeoserver/workspaces/ribasim/ribasim/datastore.xml
, as well as theconfig.py
of the next step. - Create a file
/web/config.py
with these contents:If you run GeoServer on a different port, change it here.from pathlib import Path GEOSERVER_URL = "http://localhost:8080" APP_URL = "http://localhost:3000" DATA_DIR = Path(r"d:/hydrobase_data")
- Run the app with
pixi run app
or equivalently run/serve_app.cmd
. This will create a modified GeoPackage next todatabase.gpkg
calledgeoserver_layers.gpkg
with layers more suitable for visualization with the current GeoServer workspace. - Open the locally hosted app at http://localhost:3000.