[Gdal-dev] gdal_merge fails to merge more than 4 input files
Sarah Clapham
sbclaph at ftgrp.com
Wed Feb 2 16:22:29 EST 2005
Help!
I am trying to apply the now familiar procedure of
reproject/merge/clip/compress to client image files in preparation for web
serving and am having trouble with gdal_merge failing to merge more than 4
input files.
Here are the specs...
-win2k machine w/ over 20 gigs free space, virtual memory set to 2-4gigs,
and GDAL_CACHEMAX = 4gigs
-FWTools 0.9.4 (Windows) (have uninstalled all past gdal/python versions - I
think)
-input files are 24bit color 5000x5000 tiff files (uncompressed from MrSID)
input image info:
Driver: GTiff/GeoTIFF
Size is 5000, 5000
Coordinate System is `'
Origin = (2210000.000000,640000.000000)
Pixel Size = (2.00000000,-2.00000000)
Corner Coordinates:
Upper Left ( 2210000.000, 640000.000)
Lower Left ( 2210000.000, 630000.000)
Upper Right ( 2220000.000, 640000.000)
Lower Right ( 2220000.000, 630000.000)
Center ( 2215000.000, 635000.000)
Band 1 Block=5000x1 Type=Byte, ColorInterp=Red
Band 2 Block=5000x1 Type=Byte, ColorInterp=Green
Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue
When I try to merge a set of 7 intersecting tiles - gdal_merge happily
merges the first 4 then quits - eg:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
gdal_merge -v -n 0 -o ..\tif_org_merge\s-p05-13.tif s-p05-07.tif
s-p05-08.tif s-p05-09.tif s-p05-12.tif s-p05-13.tif s-p05-14.tif
s-p05-18.tif
Filename: s-p05-07.tif
File Size: 5000x5000x3
Pixel Size: 2.000000 x -2.000000
UL:(2210000.000000,640000.000000) LR:(2220000.000000,630000.000000)
Copy 0,0,5000,5000 to 0,0,5000,5000.
Copy 0,0,5000,5000 to 0,0,5000,5000.
Copy 0,0,5000,5000 to 0,0,5000,5000.
Filename: s-p05-08.tif
File Size: 5000x5000x3
Pixel Size: 2.000000 x -2.000000
UL:(2220000.000000,640000.000000) LR:(2230000.000000,630000.000000)
Copy 0,0,5000,5000 to 5000,0,5000,5000.
Copy 0,0,5000,5000 to 5000,0,5000,5000.
Copy 0,0,5000,5000 to 5000,0,5000,5000.
Filename: s-p05-09.tif
File Size: 5000x5000x3
Pixel Size: 2.000000 x -2.000000
UL:(2230000.000000,640000.000000) LR:(2240000.000000,630000.000000)
Copy 0,0,5000,5000 to 10000,0,5000,5000.
Copy 0,0,5000,5000 to 10000,0,5000,5000.
Copy 0,0,5000,5000 to 10000,0,5000,5000.
Filename: s-p05-12.tif
File Size: 5000x5000x3
Pixel Size: 2.000000 x -2.000000
UL:(2210000.000000,630000.000000) LR:(2220000.000000,620000.000000)
Copy 0,0,5000,5000 to 0,5000,5000,5000.
Copy 0,0,5000,5000 to 0,5000,5000,5000.
Copy 0,0,5000,5000 to 0,5000,5000,5000.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Output image info:
Driver: GTiff/GeoTIFF
Size is 10000, 5000
Coordinate System is `'
Origin = (2210000.000000,640000.000000)
Pixel Size = (2.00000000,-2.00000000)
Corner Coordinates:
Upper Left ( 2210000.000, 640000.000)
Lower Left ( 2210000.000, 630000.000)
Upper Right ( 2230000.000, 640000.000)
Lower Right ( 2230000.000, 630000.000)
Center ( 2220000.000, 635000.000)
Band 1 Block=10000x1 Type=Byte, ColorInterp=Red
Band 2 Block=10000x1 Type=Byte, ColorInterp=Green
Band 3 Block=10000x1 Type=Byte, ColorInterp=Blue
My alternate strategy was to skip the merge altogether and let gdalwarp take
care of merging edge pieces during the reproject step but this fails to
clean up all edge nodata areas (leaves a partial single pixel border on each
side). I don't have the option of using the Alpha channel since this is not
going to MapServer. I have tried various settings of -te and -tr without
much luck.
I realize that this is really two questions - I would be happy to know why I
am not getting expected results from gdal_merge, then strive for a better
understanding on how to do this efficiently.
Many thanks!
Sarah
---------------------------
Sarah Clapham
Home Office:
Forest Technology Group
7 Max Meadows Road
P.O. Box 127
Maxwelton, WV 24957
(304) 497-3189 (office)
(304) 646-1941 (mobile)
[mailto:sbclaph at ftgrp.com] (email)
Main Office:
Forest Technology Group
3950 Faber Place Drive
North Charleston, SC USA 29405
(843) 745-7400 (phone)
(843) 308-6236 (fax)
www.ftgrp.com (web)
---------------------------
Sarah Clapham
Home Office:
Forest Technology Group
7 Max Meadows Road
P.O. Box 127
Maxwelton, WV 24957
(304) 497-3189 (office)
(304) 646-1941 (mobile)
[mailto:sbclaph at ftgrp.com] (email)
Main Office:
Forest Technology Group
3950 Faber Place Drive
North Charleston, SC USA 29405
(843) 745-7400 (phone)
(843) 308-6236 (fax)
www.ftgrp.com (web)
More information about the Gdal-dev
mailing list