I have two Geotiff files. with one side overlapping. Each Geotiff is surrounded by a black frame.

How the two geotiff looks like

I have created an Image Pyramid with Geoserver 2.3.0 but when I try to see the layer on OpenLayers, the layer borders appear in black, so I can't see correctly the layer, because of thats black borders.It looks like tiles in the pyramid already has black zones inherited from the original tiffs.

I've followed these steps:

First I have execute the next command on tiles to convert to Image Pyramid:

gdal_translate -a_nodata 0 <origin.tif> <target.tif>

When I have executede this command, I executed the next one:

 gdal_retile.py -levels 3 -ps 2048 2048 -co "TILED=YES" -co "BLOCKXSIZE=256" -co "TILED=YES" -co "BLOCKXSIZE=256" -co "BLOCKYSIZE=256" -targetDir tiles --optfile tiles.txt -s_srs EPSG:32719 -targetDir tiles --optfile tiles.txt

After that I try to make the Image Pyramid with Geoserver, but the result is the same that at first, I preview the layer on Openlayers and it appears with black borders.

I think Image Pyramid plugin is properly configured:

  • InputTransparentColor: #000000
  • OutputTransparentColor: #000000

I don't know what I must to do.

Any help, please???

2 Answers 2


It looks like your original tiffs are reprojected. In their original projection, there are no black borders.

Best strategy is to take the tiffs in their original CRS, build a virtual index on both with gdalbuildvrt, then reproject the vrt to the desired CRS with gdalwarp and do the tiling or pyramiding on that with gdal_retile.py.

  • I have no access to the original tiffs, only these that are in EPSG:32719. Both of them share a side with common imagery (they sightly overlap) . Around each tiff there is an area with no data (0 value in each band).
    – juanluisrp
    Commented Jun 25, 2013 at 11:29
  • Ok, you could reproject them to the right CRS yourself. But maybe using gdalbuildvrt might solve your problem.
    – AndreJ
    Commented Jun 25, 2013 at 11:32
  • I was able to build the VRT file whith gdalbuildvrt orto_index.vrt -srcnodata "0 0 0" -vrtnodata "0 0 0" *.tif. Using this .vrt file as input for gdal_retyle.py the generated pyramid does not contain the black frames. However I get an error about some tiff not being added to the VRT: Warning 6: gdalbuildvrt does not support rotated geo transforms. Skipping 2335-B.tif, but it deserves its own question.
    – juanluisrp
    Commented Jun 25, 2013 at 15:07

If you right click on the item in the layer panel tab and go to properties then transparency. Press the plus sign on the right hand side of the screen and then type "0" under the word from (first column in the header row).

After this you can right click > styles and copy style type and then paste to all other layers in the panel. This should remove the border.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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