pgh_raster
pghydro : Raster hydrology extension for PgHydro
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 1601 | pgh_raster | pghydro | 6.6 |
GIS | GPL-2.0 | SQL |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| ----d-- | No | No | No | Yes | no | no |
| Relationships | |
|---|---|
| Schemas | pgh_raster |
| Requires | plpgsql postgis postgis_raster pghydro |
| Need By | pgh_hgm |
| See Also | postgis_raster pointcloud pgrouting ogr_fdw h3 q3c mobilitydb pg_sphere |
| Siblings | pghydro pgh_hgm pgh_output pgh_output_en_au pgh_output_pt_br pgh_consistency |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 6.6 |
18 17 16 15 14 | pghydro |
plpgsql, postgis, postgis_raster, pghydro |
| RPM | PIGSTY | 6.6 |
18 17 16 15 14 | pghydro_$v |
postgis36_$v |
| DEB | PIGSTY | 6.6 |
18 17 16 15 14 | postgresql-$v-pghydro |
postgresql-$v-postgis-3 |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| el8.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| el9.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| el9.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| el10.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| el10.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| d12.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| d12.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| d13.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| d13.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| u22.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| u22.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| u24.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| u24.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| u26.x86_64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| u26.aarch64 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
Source
github.com/pghydro/pghydro
pghydro-6.6.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources: PGHydro README, pgh_raster SQL
pgh_raster adds raster-based hydrological products to PgHydro. It stores DEM, flow-path, flow-direction, and flow-accumulation rasters, then exposes functions for upstream/downstream pixel tracing, drainage-area analysis, elevation lookup, elevation profiles, and raster clipping.
Enable
Raster Tables
The extension creates the pgh_raster schema with tables such as:
| Table | Purpose |
|---|---|
pghrt_elevation |
Elevation raster data |
pghrt_flowpath |
Flow-path raster data |
pghrt_flowdirection |
Flow-direction raster data |
pghrt_flowaccumulation |
Flow-accumulation raster data |
Load raster products with PostGIS Raster tooling such as raster2pgsql, using the SRID and tiling scheme that matches the drainage dataset.
Analysis Functions
Function groups include downstream and upstream pixel traversal, upstream area lookup, downstream drainage point and area lookup, elevation pixel values, elevation profiles, and raster clipping.
Notes
pgh_raster depends on both pghydro and postgis_raster. Keep raster alignment, SRID, and nodata handling consistent with the vector drainage layers before deriving hydrogeomorphological metrics.