Skip to content

pgh_output

Output and reporting objects for PgHydro

pghydro · Output and reporting objects for PgHydro

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
1603pgh_outputpghydro6.6GISGPL-2.0SQL
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
----d--NoNoNoYesnono

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY6.619 18 17 16 15pghydroplpgsql, postgis, pghydro
RPMPIGSTY6.619 18 17 16 15pghydro_$vpostgis37_$v
DEBPIGSTY6.619 18 17 16 15postgresql-$v-pghydropostgresql-$v-postgis-3
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
el8.aarch64N/APIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
el9.x86_64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
el9.aarch64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
el10.x86_64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
el10.aarch64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
d12.x86_64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
d12.aarch64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
d13.x86_64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
d13.aarch64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
u22.x86_64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
u22.aarch64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
u24.x86_64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
u24.aarch64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
u26.x86_64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6
u26.aarch64PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6PIGSTY 6.6

Source

pig build pkg pghydro;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pghydro;		# install by package name
pig install pgh_output;		# install by extension name

pig install pgh_output -v 19;   # install for PG 19
pig install pgh_output -v 18;   # install for PG 18
pig install pgh_output -v 17;   # install for PG 17
pig install pgh_output -v 16;   # install for PG 16
pig install pgh_output -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION pgh_output CASCADE; -- requires plpgsql, postgis, pghydro

Usage

Sources: PGHydro README, pgh_output SQL

pgh_output creates export tables for PgHydro drainage-network products. It materializes drainage lines, drainage areas, watercourses, drainage points, and shorelines in a schema intended for downstream reporting or GIS exchange.

Enable

CREATE EXTENSION postgis;
CREATE EXTENSION pghydro;
CREATE EXTENSION pgh_output;

Export Tables

The extension creates the pgh_output schema with tables including:

TablePurpose
geoft_bho_drainage_lineExported drainage-line features
geoft_bho_drainage_areaExported drainage-area features
geoft_bho_watercourseExported watercourse features
geoft_bho_drainage_pointExported drainage-point features
geoft_bho_shorelineExported shoreline features

Refresh Output

SELECT pgh_output.pghfn_updateexporttables();

Run the refresh function after loading or recalculating the base PgHydro network.

Notes

Validate the PgHydro network first with consistency checks when possible. The export tables are derived products and should be regenerated after upstream drainage geometry, topology, or coding changes.

Table reader