I notice this is a rather old thread but I nevertheless have the same question I'm looking for an answer to. Would it be possible to share that script again? It seems that the dropbox link has stoped to work at this moment.
Did you find a solution to this, apart from the 35000 usd maptiler pro? I am facing the same challenge with maptiles for a leaflet map where the borders between parts of the map takes so long to fix today. And would like to have an automated solution before creating bigger maps.
Below is how I ended up implementing this in the Swift languate. Although my original question requested an answer for the GDAL C API, my app actually uses my own Swift language wrapper around the GDAL C functions. This abstracts the C functionality away, and makes the Swift programming much simpler. I need to to add a few bits a pieces to my GDAL Swift ...
Unable to reproduce the issue with the following recipe
conda create --name gdaldemo python=3.7 -y
conda activate gdaldemo
conda install -c conda-forge gdal=2.4 -y
python -m pip install gdal2tiles
# Last command to check the issue
python -c "import gdal2tiles;print(gdal2tiles.generate_tiles)"
It seems you may have a conflict between GDAL native ...