Planet PostgreSQL

Planet PostgreSQL -

Ryan Lambert: Using v4 of the Postgres H3 extension

I wrote about using the H3 extension last year in Using Uber's H3 hex grid in PostGIS and H3 indexes for performance with PostGIS data. Naturally, things have changed over the past 12 months, specifically version 4 of the H3 Postgres extension was released. The H3 Postgres extension (h3-pg) closely follows the upstream H3 project, including naming conventions. The changes made in H3 version 4 unfortunately changed every function name used in my original blog posts. It seems this mass renaming was a one-time alignment in the H3 project, hopefully they don't all get renamed again. This post covers the changes required to migrate the code in my prior two posts work with version 4.x h3-pg. Create the h3 extension Creating the extension for PostGIS usage now involves installing two (2) extensions. Some components have been split out into the h3_postgis extension. I use CASCADE when installing the h3_postgis portion since that also requires postgis_raster which I do not have installed by default. CREATE EXTENSION h3; CREATE EXTENSION h3_postgis CASCADE;

本文介绍了将H3-pg v3查询迁移到v4的方法,包括安装两个扩展和更改函数名称。还提到了其他更改,例如使用MULTIPOLYGON代替POLYGON。提供了更新的代码示例。

H3-pg MULTIPOLYGON PostGIS postgres 函数名称 迁移

相关推荐 去reddit讨论

热榜 Top10

LigaAI
LigaAI
观测云
观测云
eolink
eolink
Dify.AI
Dify.AI

推荐或自荐