0

I am trying to figure out how to merge adjacent raster datasets. Is there any clear algorithms (may be a pseudo code)?

  • How are you determining the source raster? Is it a selected raster, from a list, all in a directory, etc.? – Ryan Garnett Mar 27 '13 at 22:38
  • It's a collection of JPG images in one directory. each of them has a world file (.jpgw) and a projection file (.prj). – Angie Mar 27 '13 at 22:53
  • Do you want to find the rasters on all potential sides (ie: 4 sides along the raster edge) – Ryan Garnett Mar 27 '13 at 23:20
  • yes, it's the situation what I'm dealing with. It's some kind of mosaiced images that i want to merge in one image. – Angie Mar 27 '13 at 23:34
2

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.

|improve this answer|||||
  • Thank you very much, What I was searching for is an algorithm to embed in my gis application. However, this tool seems to be useful and suits my needs. Thank you – Angie Mar 28 '13 at 3:36
  • 1
    GDAL can be accessed through its C / C++ API, or the bindings which exist for it in numerous languages. – scw Mar 28 '13 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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