pg_geohash
使用GeoHash处理空间坐标的函数包
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
pg_geohash | 1.0 | GIS | MIT | C |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 1590 | pg_geohash | 否 | 是 | 否 | 是 | 否 | 是 | - |
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | pg_geohash | - |
| RPM | PIGSTY | 1.0 | 1817161514 | pg_geohash_$v | - |
| DEB | PIGSTY | 1.0 | 1817161514 | postgresql-$v-pg-geohash | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0 el8.x86_64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 1.0 el8.aarch64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 1.0 el9.x86_64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 1.0 el9.aarch64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 1.0 el10.x86_64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 1.0 el10.aarch64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 1.0 d12.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 1.0 d12.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 1.0 d13.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 1.0 d13.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 1.0 u22.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 1.0 u22.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 1.0 u24.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 1.0 u24.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 1.0 u26.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 1.0 u26.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
|
构建
您可以使用 pig build 命令构建 pg_geohash 扩展的 RPM / DEB 包:
BASH
安装
您可以直接安装 pg_geohash 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
BASH
使用 pig 或者是 apt/yum/dnf 安装扩展:
安装
BASH
pig
BASH
dnf
BASH
apt
BASH
创建扩展:
SQL
用法
基于 C 实现的 PostgreSQL Geohash 函数(同时支持 HAWQ 和 Greenplum)。基于 libgeohash C 库。
Geohash 背景知识:维基百科:Geohash
函数
将经纬度编码为指定精度的 geohash 字符串:
SQL
将经纬度编码为全精度的 geohash:
SQL
将 geohash 解码回经纬度:
SQL
示例
使用 5 字符精度(约 2.4km x 4.9km 网格)计算基于 geohash 的聚合:
SQL
从 geohash 恢复坐标:
SQL