Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Thanks.

share|improve this question
add comment

1 Answer 1

You can use gdal_translate with -a_nodata value to assign NODATA to a certain pixel value. See also http://www.gdal.org/gdal_translate.html . 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
add comment

Your Answer

 
discard

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.