Hera is an advanced open-source project by Kaplan Open Source Consulting focused on web-based GIS systems and data processing. It serves as a framework for managing complex geographical data and interactive map visualizations.
You can view the live deployment of this project here: https://kaplanopensource.github.io
- GIS Integration: Built-in support for OpenStreetMap and custom geographic data layers.
- Django Framework: Robust backend architecture designed for scalability.
- Data Analysis: Flexible pipelines for processing and visualizing spatial information.
- Interactive Maps: Lightweight, mobile-friendly interactive map interfaces.
- OS: Ubuntu 22.04 LTS (verified)
- Python: 3.9.13+
- Docker: Required for quick install (MongoDB runs in a container)
The fastest way to get Hera running. Requires Docker and Python 3.9+.
-
Clone the repository:
git clone https://github.com/KaplanOpenSource/hera cd hera -
Run the initialization script:
source init_with_mongo.shThis single script will:
- Set up Hera environment variables (
HERA_REPO_ROOT,PYHERA_DIR,PYTHONPATH) - Prompt to create a Python virtual environment at
~/.pyhera/environmentwith all dependencies installed - Prompt to persist the environment to
~/.bashrc - Prompt to auto-activate the Hera environment when you
cdinto the project directory - Pull and start a MongoDB 5.0 Docker container with preconfigured credentials
- Create the
~/.pyhera/config.jsonconfiguration file automatically
After running, everything is ready to use.
- Set up Hera environment variables (
-
Install system dependencies and third-party tools (optional):
make install-deps # System packages (libcairo, GDAL, etc.) make install-paraview # ParaView 5.11.0 make install-freecad # FreeCad Python3 bindings make install-openfoam # OpenFOAM 10 make install-deps-all # All of the above
| Script | Purpose |
|---|---|
source set_hera_environment.sh |
Set environment variables, create venv, configure .bashrc (called automatically by init_with_mongo.sh) |
source activate_hera.sh |
Activate the Hera venv and environment in the current shell |
init_with_mongo.sh |
Full initialization: environment setup + MongoDB via Docker |
After the initial setup, use the Makefile to manage the MongoDB container:
make mongo-up # Start MongoDB (data at ~/mongo-db-datadir)
make mongo-down # Stop MongoDB
make mongo-status # Check container status
make mongo-logs # Tail container logs
make mongo-clean # Remove container and delete all data
make mongo-up MONGO_DATA=/path/to/data # Override data directorymake test-setup # Create test data directory structure at ~/hera_unittest_data
make test # Run all tests (requires MongoDB + test data)Run make help to see all available targets.
If you prefer not to use Docker or need more control over each step, follow these instructions.
sudo apt install libcairo2-dev pkg-config python3-dev libgirepository1.0-dev libgdal-dev gdal-bin python3-gdalgit clone https://github.com/KaplanOpenSource/hera
cd hera
python3.9 -m venv heraenv
source heraenv/bin/activatepip install -r requirements.txtIf this fails, reinstall setuptools first:
pip install --upgrade --force-reinstall setuptools
pip install -r requirements.txtUse gdalinfo --version to obtain your OS GDAL version, then:
pip install GDAL==`gdal-config --version`Add the following to your shell profile or virtual environment activate script:
export PYTHONPATH=$PYTHONPATH:/path/to/hera
export PATH=$PATH:/path/to/hera/hera/binCreate required directories:
mkdir -p ~/.pyhera/log/Install MongoDB 6.0 following the official instructions and ensure it runs on port 27017.
Start MongoDB with mongosh and create users:
use admin
db.createUser(
{
user: "Admin",
pwd: "Admin",
roles: [ { role: "userAdminAnyDatabase", db: "admin" } , "readWriteAnyDatabase"]
}
)
use admin
db.createUser(
{
user: "{username}",
pwd: "{password}",
roles: [ { role: "readWrite", db: "{dbName}" } ]
}
)Create ~/.pyhera/config.json:
{
"{username}": {
"dbIP": "{host}",
"dbName": "{database name}",
"password": "{password}",
"username": "{username}"
}
}{username}- should match your Ubuntu system user{host}- MongoDB address, typically127.0.0.1for local{dbName}- name of database{password}- choose a password
Full documentation is available at https://KaplanOpenSource.github.io/hera/.
The documentation covers architecture, toolkits, testing, CLI reference, examples, and more.
# Activate the Hera environment (if not already active)
source activate_hera.sh
# Start the local development server with live reload
mkdocs serve
# The site will be available at http://127.0.0.1:8000To build a static version of the site:
mkdocs build
# Build with strict mode (catches broken links and warnings)
mkdocs build --strictThe documentation is automatically deployed to GitHub Pages whenever changes are pushed to the master branch.
- A GitHub Actions workflow (
.github/workflows/docs.yml) monitors themasterbranch - When changes are detected in
docs/,mkdocs.yml, orhera/code, it builds and deploys automatically - The live site updates within 1-2 minutes after merging to
main
Manual deployment (for testing from other branches):
mkdocs gh-deploy --forceNote: All dependencies (including documentation) are consolidated in
requirements.txt. Documentation uses MkDocs Material.
Refer to ui/README.md
All instructions are for Ubuntu OS.
Paraview may be used to view results in a convenient GUI. Download from paraview.org. To prevent conflicts between your Python version and Paraview's Python version, make sure to use Paraview with your Python.
Add Paraview libs to PYTHONPATH:
export PYTHONPATH=/raid/software/ParaView-5.11.0-MPI-Linux-Python3.9-x86_64/lib/python3.9/site-packages/:$PYTHONPATHFreeCad is an open source CAD software that can be embedded in Python.
Install the freecad-python3 package:
sudo apt-get install libfreecad-python3-0.19Then add the library path to PYTHONPATH:
FREECADPATH = '/usr/lib/freecad-python3/lib/'
import sys
sys.path.append(FREECADPATH)More information on embedding FreeCAD
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get -y install openfoam10
echo ". /opt/openfoam10/etc/bashrc" > of10 # use source of10 to setup OpenFOAM environment