kartoza / docker-postgis

Dockerfile for postgis
GNU General Public License v2.0
648 stars 317 forks source link

Feature/extension h3 #428

Closed Martenz closed 1 year ago

Martenz commented 1 year ago

Based on this tutorial

https://blog.rustprooflabs.com/2023/05/postgis-h3-v4-refresh and previous https://blog.rustprooflabs.com/2022/04/postgis-h3-intro

I added to my local image the h3 extension for Uber-h3 cells postgis functions.

Which depends on

https://github.com/zachasme/h3-pg

the library installation needs pgxn client and make > 3.20 installed so I modified the docker file accordingly.

Do you think it will be possible to include this library in the develop and next release of available docker images?

I already tested it in local adding the extension to the env var:

  - POSTGRES_MULTIPLE_EXTENSIONS=postgis,hstore,postgis_topology,postgis_raster,pgrouting,h3,h3_postgis

and it works.

you can test it running the following query once container is up:

SELECT extname, extversion FROM pg_catalog.pg_extension WHERE extname IN ('h3', 'h3_postgis') ;

NyakudyaA commented 1 year ago

Ping @Martenz

mbforr commented 1 year ago

just wanted to check to see if there are any plans to have this merged in?

NyakudyaA commented 1 year ago

just wanted to check to see if there are any plans to have this merged in?

@mbforr please address the review comments and then we can merge

mbforr commented 1 year ago

@NyakudyaA let me know if that works for you - thanks!

NyakudyaA commented 1 year ago

@Martenz Can you give this one test run and then we merge

mbforr commented 1 year ago

@NyakudyaA hey so the edits here and here:

https://github.com/kartoza/docker-postgis/pull/428/commits/10d88541eed8ba04a08bf046903a56e3c044e051#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L143

https://github.com/kartoza/docker-postgis/pull/428/commits/10d88541eed8ba04a08bf046903a56e3c044e051#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L61

actually removed the install for h3. would it make sense to add those back to a new PR to add them in?

NyakudyaA commented 1 year ago

cmake is installed here https://github.com/kartoza/docker-postgis/blob/develop/Dockerfile#L26 h3 is installed here https://github.com/kartoza/docker-postgis/blob/develop/Dockerfile#L111

Have you actually tested the image?

NyakudyaA commented 1 year ago

@Martenz

image

mbforr commented 1 year ago

my fault! was running the old one but this works thanks all!