Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several hundered geotiff files. Some of them (almost all of them) have black areas (irregular) on the edges. However, these black areas are covered by some other file in the file set.

I read this post but it looks that the black in my file is not marked as NODATA (only 3 bands in the VRT file).

Is there away to join/overlap two geotiff files (into one) and make the black color as transparent so missing areas are filled from the other file?


share|improve this question

You can use gdal_translate with -a_nodata value to assign NODATA to a certain pixel value. See also . After that you can merge them with gdalwarp.

share|improve this answer
Caution: This would also incorrectly assign NODATA to any black pixels within the image area (assuming the specified value for gdal_translate -a_nodata is black). In other words, pixels that are legitimately supposed to be black would be NODATA. – user3461 Jan 5 '12 at 20:26
I did the first step. The second takes alot of time. It is already 2 days running and still not finished. is this ok for gdalwarp? (7 files, 2.7G each) – alsaleem Jan 7 '12 at 6:49
You can greatly speed up things using the GDAL cache: gdalwarp --config GDAL_CACHEMAX 3000 -wm 3000 ... – markusN Mar 3 '12 at 5:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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