It can be light server using a PHP script or simply a directory
wget https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/raster/HYP_HR_SR_OB_DR.zip
unzip HYP_HR_SR_OB_DR.zip # Or unzip manually with 7zip or a similar software
Generate MBTiles with GDAL approach
gdal_translate HYP_HR_SR_OB_DR/HYP_HR_SR_OB_DR.tif my_dataset.mbtiles -of MBTILES
gdaladdo -r average my_dataset.mbtiles 2 4 8 16
cd ..
Generate MBTiles with gdal2mbtiles approach
Install with
pip install gdal2mbtiles
Then
gdal2mbtiles --min-resolution 0 --max-resolution 12 HYP_HR_SR_OB_DR/HYP_HR_SR_OB_DR.tif HYP_HR_SR_OB_DR.mbtiles # broken on our device
Serve resulting MBTiles with PHP script
git clone https://github.com/maptiler/tileserver-php.git
cd mbtiles-php
mv ../my_dataset.mbtiles .
mv ../HYP_HR_SR_OB_DR.mbtiles .
php -S 0.0.0.0:8081 # To serve PHP code without using Apache (fine for dev only). You will need to push the PHP file on the server
Open http://localhost:8081/tileserver.php to access a preview and zoom in a bit (the tiles are not available on zoom 0)
It can work on any PHP hosting with PHP extension SQLite support
# Create directory to receive generated tiles
mkdir output
# You will generate tiles and an associated viewer with Leaflet library
gdal2tiles.py --webviewer=leaflet --zoom=0-6 HYP_HR_SR_OB_DR.tif output # min zoom = 0 and max zoom = 6
You can now open leaflet.html file in your browser to see the result (PS: tick the layer the right panel and zoom)
Then, you can push the directory and its content to your hosting to deploy