0

I refer to the Problem/Solution in this Article:

Output of gdal2tiles has black edges round it

I've the same problem and tried so many options and variations with no success. :( I've some geotiffs (tif + tfw) with a black background (this shoud be transparent in the finels TMS). First i create a VRT Layer by:

gdalbuildvrt.exe "C:\Tiles\huenenberg.vrt" "C:\Tiles\huenenberg/*.tif"

Second i create the TMS by GDAL2TILES by:

python3 C:/OSGeo4W64/bin/gdal2tiles.py --profile=mercator -s EPSG:21781 --processes=6 -z 10-15 -e -a 0,0,0 "C:\Tiles\huenenberg.vrt" "C:/Tiles/huenenberg/tileset/"

I tried with different options, but i cant't eleminate the black triangle-border.

I also tried first to reproject by gdalwarp with no success.

crazypix
  • 21
  • 2
  • 5
  • How do you view your images? Have you tried to use gdal2tiles with just one input image to eliminate the possibility that your vrt is created with wrong options. Opening the vrt file with QGIS may also give some info. Does it look good? – user30184 Dec 11 '20 at 16:39
  • one single tiff as input works fine and gives a fine result. but i've a very large area with many tiff's so i have to use vrt. it is a good idea to check the vrt in qgis - thanks for that, – crazypix Dec 15 '20 at 20:32
  • I asked because if nodata triangles are not handled correctly in the vrt then gdal2tiles will do the same. I guess that -vrtnodata option is worth a try https://gdal.org/programs/gdalbuildvrt.html, perhaps together with -srcnodata. – user30184 Dec 15 '20 at 21:01
  • Thank you so much ill give it a chance and tell if it worked – crazypix Dec 17 '20 at 15:26

0 Answers0