[gdal-dev] Mosaic to vrt format with gdalwarp

Eli Adam EAdam at co.lincoln.or.us
Fri Jan 15 22:45:05 EST 2010


Hi all,
     I'm having some trouble using gdalwarp to mosaic ArcInfo Binary Grid files to vrt.

Here is what I want to do and works in .tif.  I mosaic the three grids be... to test2.tif:
gdalwarp -t_srs "EPSG:2913" -s_srs "EPSG:2994" -srcnodata "0 0 0" -dstnodata "0 0 0" -of GTIFF be44123g8b be44123g8c be44123g8a test2.tif
Creating output file that is 11039P x 15191L.
Processing input file be44123g8b.
0...10...20...30...40...50...60...70...80...90...100 - done.
Processing input file be44123g8c.
0...10...20...30...40...50...60...70...80...90...100 - done.
Processing input file be44123g8a.
0...10...20...30...40...50...60...70...80...90...100 - done.
test2.tif looks fine with gdalinfo and in OpenEV.


That works how I want.  However, I have many more than 3 grids and can't create an output file that large.  So I use vrt which has been very useful to me in the past:
gdalwarp -t_srs "EPSG:2913" -s_srs "EPSG:2994" -srcnodata "0 0 0" -dstnodata "0 0 0" -of VRT be44123g8b be44123g8c be44123g8a test2.vrt
Creating output file that is 11039P x 15191L.
Processing input file be44123g8b.
test2.vrt looks fine with gdalinfo but not in OpenEv.  Also, when I look in the .vrt file itself, I only see one reference to the 1 grid and not to the other 2 grids:
 <SourceDataset relativeToVRT="1">be44123g8b</SourceDataset>

I also notice that when processing to tif each of the 3 grids are listed.  When processing to .vrt only 1 grid is listed.

I read up on vrt here, http://www.gdal.org/gdal_vrttut.html to try and manually create/edit a vrt file but my preliminary tries weren't successful.  

Let me know if you need any additional information on this or have any ideas.

Thanks, Eli




More information about the gdal-dev mailing list