I am trying to figure out how to merge adjacent raster datasets. Is there any clear algorithms (may be a pseudo code)?
Well if you are looking to merge all the images from a folder you can do a two step process.
1) Use command prompt to make a directory list file [ dir c:\temp\*.jpg /b /s >c:\temp\imagelist.txt ] 2) Using FWTools run gdal_merge [ gdal_merge -o c:\temp\mosaic.tif -q -v --optfile c:\temp\imagelist.txt ]
This will make a file of all the images in a directory, and then mosaic the files into an output file.