pg_geohash_extra
pg_geohash_extra · Additional geohash functions for PostGIS
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100515 | pg_geohash_extra | pg_geohash_extra | 0.0.1 | GIS | GPL-3.0 | C |
| Relationships | |
|---|---|
| Requires | postgis |
Usage
Sources:
pg_geohash_extra supplements PostGIS with functions for finding neighbouring geohashes and covering a geometry with geohash cells. It also installs helper grid/composite objects used by an alternate geometry-covering function.
Core Workflow
geohashfromgeom transforms a non-4326 geometry to SRID 4326, covers its bounding range at the requested precision, and returns text geohashes. It is a cell-covering helper, not an exact geometry decomposition.
Object Index
geohash_neighbours(text)returns the eight adjacent geohashes around the input cell.geohashfromgeom(geometry, integer)returns text geohashes covering a geometry’s range.ST_RegularGrid(geometry, numeric, numeric, boolean)returns grid points or cells asT_Gridrows.st_geohashfromgeom(geometry, integer)returns compositegeohashrows with ID, precision, and geometry.geohashandT_Gridare composite helper types.
Operational Notes
Version 0.0.1 requires postgis, is relocatable, and declares no preload requirement. Validate precision and input SRID, and separately test antimeridian, polar, empty, and very large geometries; the implementation is early-stage and the README lists substantial future work.
Review installation in a disposable database first. The extension script runs DROP TYPE IF EXISTS ... CASCADE for generic type names geohash and T_Grid, and changes ST_RegularGrid ownership to the hard-coded role postgres. Those actions can remove dependent objects, conflict with existing names, require elevated privileges, or fail where the postgres role does not exist.