pghydro
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pghydro | 6.6 | GIS | GPL-2.0 | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 1600 | pghydro | No | No | No | Yes | No | No | pghydro |
| 1601 | pgh_raster | No | No | No | Yes | No | No | pgh_raster |
| 1602 | pgh_hgm | No | No | No | Yes | No | No | pgh_hgm |
| 1603 | pgh_output | No | No | No | Yes | No | No | pgh_output |
| 1604 | pgh_output_en_au | No | No | No | Yes | No | No | pgh_output_en_au |
| 1605 | pgh_output_pt_br | No | No | No | Yes | No | No | pgh_output_pt_br |
| 1606 | pgh_consistency | No | No | No | Yes | No | No | pgh_consistency |
| Related | plpgsql postgis |
|---|
Lead row; package also ships pgh_raster, pgh_hgm, pgh_output, pgh_output_en_au, pgh_output_pt_br, and pgh_consistency.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 6.6 | 1817161514 | pghydro | plpgsql, postgis |
| RPM | PIGSTY | 6.6 | 1817161514 | pghydro_$v | postgis36_$v |
| DEB | PIGSTY | 6.6 | 1817161514 | postgresql-$v-pghydro | postgresql-$v-postgis-3 |
Build
You can build the RPM / DEB packages for pghydro using pig build:
pig build pkg pghydro # build RPM / DEB packages
Install
You can install pghydro directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pghydro; # Install for current active PG version
pig ext install -y pghydro -v 18 # PG 18
pig ext install -y pghydro -v 17 # PG 17
pig ext install -y pghydro -v 16 # PG 16
pig ext install -y pghydro -v 15 # PG 15
pig ext install -y pghydro -v 14 # PG 14
dnf install -y pghydro_18 # PG 18
dnf install -y pghydro_17 # PG 17
dnf install -y pghydro_16 # PG 16
dnf install -y pghydro_15 # PG 15
dnf install -y pghydro_14 # PG 14
apt install -y postgresql-18-pghydro # PG 18
apt install -y postgresql-17-pghydro # PG 17
apt install -y postgresql-16-pghydro # PG 16
apt install -y postgresql-15-pghydro # PG 15
apt install -y postgresql-14-pghydro # PG 14
Create Extension:
CREATE EXTENSION pghydro CASCADE; -- requires: plpgsql, postgis
Usage
Sources: README, repo, releases
pghydro is the core extension in the PgHydro suite for drainage-network analysis and water-resources decision support on top of PostgreSQL and PostGIS.
Install the PgHydro suite
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_raster;
CREATE EXTENSION pghydro;
CREATE EXTENSION pgh_raster;
CREATE EXTENSION pgh_hgm;
CREATE EXTENSION pgh_consistency;
CREATE EXTENSION pgh_output;
The upstream README presents these companion extensions together:
pghydrofor drainage-network analysispgh_rasterfor DEM-derived hydrological productspgh_hgmfor hydrogeomorphological analysispgh_consistencyfor Pfafstetter consistency checkspgh_outputfor reporting objects
What upstream says it covers
The README describes support for:
- flow-direction correction in river networks
- Otto Pfafstetter basin coding
- upstream and downstream stretch selection
- distance-to-mouth calculations
- upstream area calculations
- river orders and basin levels
Requirements
- PostgreSQL 9.1+
- PostGIS 3.x
- PostGIS Raster
Notes
- The current upstream README status section still says the master branch tracks release
6.6and the develop branch tracks6.7-dev. - The repository also publishes newer tags, but the user-facing README remains centered on the
6.6installation and tutorial flow.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.