diff --git a/scripts/postprocess.sh b/scripts/postprocess.sh index 5d4cde7..d3a55d9 100755 --- a/scripts/postprocess.sh +++ b/scripts/postprocess.sh @@ -59,6 +59,21 @@ else echo "gdal2tiles.py is not installed, will skip tiling" fi +# Generate MBTiles +if hash gdal_translate 2>/dev/null; then + orthophoto_path="odm_orthophoto/odm_orthophoto.tif" + orthophoto_mbtiles_path="odm_orthophoto/odm_orthophoto.mbtiles" + + if [ -e "$orthophoto_path" ]; then + gdal_translate $orthophoto_path $orthophoto_mbtiles_path -of MBTILES + gdaladdo -r bilinear $orthophoto_mbtiles_path 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 + else + echo "No orthophoto found at $orthophoto_path: will skip MBTiles generation" + fi +else + echo "gdal_translate is not installed, will skip MBTiles generation" +fi + # Generate Potree point cloud (if PotreeConverter is available) if hash PotreeConverter 2>/dev/null; then potree_input_path=""