I have a bunch of aerial photographs (>70 covering over 10000km2) that are tiled from which I want to build a VRT and ultimately export multiple (~2000) tiny sections (~300m x 300m) distributed around the whole territory using gdal_translate. That should be fairly easy, however I have some tiles that are represented twice (for 2 differents years) where the difference is in the NODATA. Here is a simple example:
When I build the VRT using:
"C:\Mrnmicro\Applic\gdal\1.11.1\gdalbuildvrt.exe" -srcnodata "0" -overwrite "C:\Users\ferba1\Desktop\jeter\testvrt\mosai.vrt" "C:\Users\ferba1\Desktop\jeter\testvrt\*.jp2"
However, if I try to export the two squares using gdal_translate:
C:\Mrnmicro\Applic\gdal\1.11.1\gdal_translate.exe" -projwin 273000 5246300 273300 5246000 -of "GTiff" "C:\Users\ferba1\Desktop\jeter\testvrt\mosai.vrt" "C:\Users\ferba1\Desktop\jeter\testvrt\nord.tif
C:\Mrnmicro\Applic\gdal\1.11.1\gdal_translate.exe" -projwin 278000 5238300 278400 5238000 -of "GTiff" "C:\Users\ferba1\Desktop\jeter\testvrt\mosai.vrt" "C:\Users\ferba1\Desktop\jeter\testvrt\sud.tif
The red square is all nodata while the blue square is ok. Is there a way that gdal_translate on a vrt with no data like that better deal with missing data when I have overlapping images?