tum-gis / cesium-terrain-builder-docker

Dockerfile for the geo-data/cesium-terrain-builder app with quantized mesh support.
Apache License 2.0
204 stars 51 forks source link

Gdal version? #20

Open bertt opened 1 year ago

bertt commented 1 year ago

Hi, I noticed that GDAL 2.4.0 from 2018 in this Docker image (tumgis/ctb-quantized-mesh:latest)

$ gdalinfo --version
GDAL 2.4.0, released 2018/12/14

Is it possible to upgrade to 3.7 (2023)?

bertt commented 1 year ago

I see the alpine tagged image has 3.1.4 is this intentional?

bash-5.0# gdalinfo --version
GDAL 3.1.4, released 2020/10/20
BWibo commented 1 year ago

This depends on the build process and the versions of the dependencies for different base images versions. As ctb is no longer actively developed, the build is very likely to fail if you use newer GDAL versions. For instance, trying to build with the latest Debian version bookworm fails, as it uses GDAL 3.6.2, which causes an error during the build process. On Alpine I managed to build against GDAL 3.14 on Debian I got it working with 2.4.0.

You could try to install different dependency versions/use different base iamge versions and test if the build works. Sadly, there is no documentation of what GDAL versions are supported or what versions introduce breaking changes, that would require fixes in the ctb code.

I don't have time to try this out. Pull request welcome! 😄

mhaberler commented 1 year ago

hi @bertt

I've spent two days trying to get cesium-terrain-builder to build in a more recent environment than the docker image

my primary interest is to generate terrains with --profile mercator to explore wrapping the terrain files into pmtiles, for which EPSG: 3857 is required, see https://app.slack.com/client/T029HV94T/C04SDBDEK1Q/thread/C04SDBDEK1Q-1692893229.817529

--profile mercator does not work with tum-gis docker which is based on https://github.com/ahuarte47/cesium-terrain-builder/tree/master-quantized-mesh

I've tried on MacOS with GDAL 3.7.1 and linux with 3.6.2 - while the mesh generation seems to work the overview tiles all come out as black so I suspice some issue with GDALCreateOverviewDataset(), my GDAL fu is too low to engage in fixing this

I have doubts somebody ever was successful generating a working terrain with GDAL 3x, same goes for --profile mercator

I've worked in patches from https://github.com/adam-ce/cesium-terrain-builder/commits/master-quantized-mesh hoping this fixes mercator - to no avail

my conclusion so far is: if you get by with using the tum-gis docker ctb-tile you're fine

everything else - AFAICT this is an abandoned project and you are out on your own - I cant discern a community interested in moving this forward

I'm about to give up on this except for standard use of the tum-gis docker image

an interesting alternative could be to explore https://github.com/kylebarron/pydelatin and https://github.com/kylebarron/dem-tiler but I'm too far off the subject to try without a worked example

btw thanks for your great blog!

bertt commented 1 year ago

Hi @mhaberler ok nice, I believe the profile mercator worked in the Alpine image (somehow), but I was unable to get the terrain working in Cesium (also black tiles - needs some more investigation). My goal was also to get it working in PMTIles.