rustprooflabs / pgosm-flex

PgOSM Flex provides high quality OpenStreetMap datasets in PostGIS (Postgres) using the osm2pgsql Flex output.
MIT License
100 stars 20 forks source link

Draft: (Don't Merge) Install H3 extension #365

Closed rustprooflabs closed 9 months ago

rustprooflabs commented 11 months ago

Details

This adds the h3 extension into the Docker image. As it stands, I do not plan to merge this into main. To install h3 via pgxn I needed a version of cmake newer than what is on Debian 11. Building a newer cmake from source is a huge slowdown to initial docker build.

I haven't tried going down the path of building the h3 extension from source. I suspect I will encounter the same minimum cmake version.

real    19m7.325s
user    0m2.124s
sys 0m1.271s
rustprooflabs commented 11 months ago

Increases the raw sizes reported by docker images, from 1.73 GB to 2.23 GB (+29%)

rustprooflabs/pgosm-flex            h3         fca216bb86ac   14 minutes ago   2.23GB
rustprooflabs/pgosm-flex            0.10.2     70fa27f0b1bb   3 weeks ago      1.73GB

Increases the compressed size quite a bit, from 531.55 MB to 666.8 MB. (+25%)

image

jacopofar commented 9 months ago

Out of curiosity, why not Debian 12?

rustprooflabs commented 9 months ago

@jacopofar Because the base image postgis/postgis:16-3.4 uses Debian 11. I didn't want H3 in here strongly enough (yet) to go through the headache of rewriting the Dockerfile. Partly because I figured it'd naturally get there before too much time goes by, and the rest because I don't like fighting Docker :smile:

I would be willing to consider a PR changing the base Dockerfile to support this. If we go down that route I'd prefer Ubuntu over Debian just because I use it more and it's easier to manage packages.

Curious back at ya -- Is there a use case you'd like to see supported with H3 baked into this image?

jacopofar commented 9 months ago

No not really, I just got a notification about this PR and was curious :)

I had a similar problem with old tzdata in Debian (https://github.com/docker-library/postgres/issues/1046) used as a base image for Postgres. I'm not using H3 though so no idea about this use case