4

I have merged 21 GeoTIFF images using GDAL utilities. Each image is the result of merging 500 smaller tiles. I am using ImageMosaic in Geoserver but I am getting a mosaic that contains white lines and distortions. The lines and distortions become smaller and finer when zooming in.

enter image description here

enter image description here

What could be the reason behind having those white lines?

The commands that I used are:

gdalbuildvrt -srcnodata 255 -vrtnodata 255 -a_srs EPSG:27700 -input_file_list tiff_list.txt mosaic.vrt

gdal_translate -of GTiff -co TILED=YES -co BIGTIFF=YES -co COMPRESS=JPEG -co JPEG_QUALITY=80 -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co PHOTOMETRIC=YCBCR mosaic.vrt mosaic.tif

gdaladdo mosaic.tif -r average --config COMPRESS_OVERVIEW JPEG --config JPEG_QUALITY_OVERVIEW 60 --config INTERLEAVE_OVERVIEW PIXEL --config PHOTOMETRIC_OVERVIEW YCBCR 2 4 8 16 32 64 128 256 512
  • Welcome to GIS.SE. Do you see the lines on the first merge level? What is the source of the TIFF files? – BradHards Jan 13 '14 at 0:11
  • @BradHards Thanks for your comment. There are no lines when viewing each of the 21 GeoTIFF images individually but when they are put together as layers, or using ImageMosaic, then lines become visible. The TIFF files are satellite images. – GIS_DBA Jan 13 '14 at 8:31
  • Best guess is some distortion around the edges (uncertain why - perhaps from the resampling? do you have NODATA pixels for all the edges? does gauss make it any better?), but can you try to mosiac the 500 * 21 files in one go? – BradHards Jan 13 '14 at 8:49
  • @BradHards: I don't have no data values around the edges. I tried with gauss but didn't change anything. I merged all the files in one go and the result was a big perfect image. The problem is, the image is huge and couldn't create overviews for it using gdaladdo so it is useless. – GIS_DBA Jan 21 '14 at 10:37
4

I have fixed the problem by compressing the images using GDAL utilities with LZW compression method instead of the JPEG compression. Also, I have used Layer Group in GeoServer to group the 21 images together instead of ImageMosaic plugin and the problem was gone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.