pgh_raster
PgHydro 栅格水文分析扩展
pghydro · PgHydro 栅格水文分析扩展
概览
| ID | 扩展 | 软件包 | 版本 | 类别 | 许可证 | 编程语言 |
|---|---|---|---|---|---|---|
| 1601 | pgh_raster | pghydro | 6.6 | GIS | GPL-2.0 | SQL |
| 属性 | 可执行文件 | 动态库 | 需要预加载 | 需要建扩展 | 可迁移 | 可信 |
|---|---|---|---|---|---|---|
| ----d-- | 否 | 否 | 否 | 是 | 否 | 否 |
软件包
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 | PIGSTY 6.6 |
| el8.aarch64 | N/A | 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 |
源码
安装
在数据库中创建扩展。
用法
来源:PGHydro README,pgh_raster SQL
pgh_raster 为 PgHydro 增加基于栅格的水文产品。它保存 DEM、flow path、flow direction、flow accumulation 栅格,并提供上游/下游像元追踪、排水区分析、高程查询、高程剖面和栅格裁剪函数。
启用
栅格表
扩展创建 pgh_raster schema,其中包括:
| 表 | 用途 |
|---|---|
pghrt_elevation | 高程栅格数据 |
pghrt_flowpath | flow path 栅格数据 |
pghrt_flowdirection | flow direction 栅格数据 |
pghrt_flowaccumulation | flow accumulation 栅格数据 |
可以使用 raster2pgsql 等 PostGIS Raster 工具加载栅格产品,并确保 SRID 与切片方式匹配排水数据集。
分析函数
函数组包括下游和上游像元遍历、上游面积查询、下游排水点和排水区查询、高程像元值、高程剖面,以及栅格裁剪。
注意事项
pgh_raster 同时依赖 pghydro 和 postgis_raster。派生水文地貌指标之前,应确保栅格对齐、SRID 和 nodata 处理与矢量排水图层一致。