Jay,<br><br>The external overview files are created in TIFF format. I checked. However, most of the metadata will be lost.<br>You can recover the metadata by using gdal_translate with "-outsize 3.125% 3.125%". It will read the metadata from the original file and the pixels from the level 32 overview.<br>
<br>Regarding the 2.1GB file:<br>Check if the directory is not read-only and the disk has sufficient space.<br>Run gdaladdo with the environment variable CPL_DEBUG set to YES and report the messages.<br><br>You can also try gdalwarp multiple times with the resampling method set to something other than 'near' and 'bilinear'. However, I am not sure if this will give you want you want.<br>
<br><div class="gmail_quote">On Tue, Feb 22, 2011 at 4:26 AM, Jay Jennings <span dir="ltr"><<a href="mailto:Jennings.Jay@geoeye.com">Jennings.Jay@geoeye.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Unfortunately I can’t provide the file (it’s about 2.1 GB and not releasable), but below is the ‘gdalinfo’ dump for it.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">The problem may be related to size of the input, because the same command worked OK on a GeoTiff that is “only” 975 MB.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">BTW For the 975 GB run that succeeded, the created overview was named *.ovr rather than *.tif. Is this expected ? The guidance for ‘gdaladdo’ hints that the created *.ovr is actually a TIFF, but that’s not true here (I tried renaming it *.tif, but no TIFF reader could open it).</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Driver: GTiff/GeoTIFF</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Files: XXXXXX.tif</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Size is 25733, 27840</span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);">Coordinate System is:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">GEOGCS["WGS 84",</span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);"> DATUM["WGS_1984",</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> SPHEROID["WGS 84",6378137,298.257223563,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> AUTHORITY["EPSG","7030"]],</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> AUTHORITY["EPSG","6326"]],</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> PRIMEM["Greenwich",0],</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> UNIT["degree",0.0174532925199433],</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> AUTHORITY["EPSG","4326"]]</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Origin = (-100.375165330488004,29.624901844319002)</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Pixel Size = (0.000004869286704,-0.000004495684143)</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Metadata:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> TIFFTAG_DATETIME=2009:07:17 06:16:07</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> TIFFTAG_ARTIST=GeoEye</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> TIFFTAG_COPYRIGHT=(C) COPYRIGHT GeoEye, All Rights Reserved</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> TIFFTAG_MINSAMPLEVALUE=0</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> TIFFTAG_MAXSAMPLEVALUE=255</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> AREA_OR_POINT=Area</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Image Structure Metadata:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> INTERLEAVE=PIXEL</span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);">Corner Coordinates:</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Upper Left ( -100.3751653, 29.6249018) ( 100d22'30.60"W, 29d37'29.65"N)</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Lower Left ( -100.3751653, 29.4997420) ( 100d22'30.60"W, 29d29'59.07"N)</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Upper Right ( -100.2498639, 29.6249018) ( 100d14'59.51"W, 29d37'29.65"N)</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Lower Right ( -100.2498639, 29.4997420) ( 100d14'59.51"W, 29d29'59.07"N)</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Center ( -100.3125146, 29.5623219) ( 100d18'45.05"W, 29d33'44.36"N)</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Band 1 Block=512x512 Type=Byte, ColorInterp=Red</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Band 2 Block=512x512 Type=Byte, ColorInterp=Green</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Band 3 Block=512x512 Type=Byte, ColorInterp=Blue</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;"><p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> Chaitanya kumar CH [mailto:<a href="mailto:chaitanya.ch@gmail.com" target="_blank">chaitanya.ch@gmail.com</a>] <br>
<b>Sent:</b> Monday, February 21, 2011 4:19 PM<br><b>To:</b> Jay Jennings<br><b>Cc:</b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br><b>Subject:</b> Re: [gdal-dev] Downsample with averaging?</span></p>
</div><div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom: 12pt;">Jay,<br><br>Can you provide a sample file that gives this error?</p><div><p class="MsoNormal">On Tue, Feb 22, 2011 at 1:56 AM, Jay Jennings <<a href="mailto:Jennings.Jay@geoeye.com" target="_blank">Jennings.Jay@geoeye.com</a>> wrote:</p>
<div><div><p class="MsoNormal">Hello list,</p><p class="MsoNormal">(using GDAL 1.8.0) I am trying to create a 32:1 down-sampled overview of a GeoTiff satellite image. My first thought was gdal_translate, with args such as “-outsize 3.125% 3.125%”… which produces surprisingly high quality given the absence of a resampling option. However I’m looking for a downsampling scheme that creates a result pixel by averaging all relevant source pixels (I know, for 32:1 downsample, that means 1024 source pixels for each result pixel !) with the hope of an output that is not “speckled” or “grainy” insofar as possible.</p>
<p class="MsoNormal"> </p><p class="MsoNormal">I also looked at gdaladdo, which does have the “-r average” resampling option… the guidance at <a href="http://gdal.org" target="_blank">gdal.org</a> seems to suggest that it can produce a 32:1 GeoTIFF external overview with a command like this:</p>
<p class="MsoNormal"> </p><p class="MsoNormal">gdaladdo -r average -ro XXXXX.tif 32</p><p class="MsoNormal"> </p><p class="MsoNormal">But that produces a surprising error message, namely:</p><p class="MsoNormal">ERROR 4: `XXXXX.tif.ovr' does not exist in the file system, and is not recognised as a supported dataset name.</p>
<p class="MsoNormal"> </p><p class="MsoNormal">Am I barking up the wrong tree with gdaladdo for this purpose ? Anybody have any suggestions for highest-quality down-sampling ? Thanks in advance.</p><p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="color: rgb(136, 136, 136);">--Jay Jennings</span></p></div></div><p class="MsoNormal"><br>_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></p></div><p class="MsoNormal"><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E</p></div></div></div></div><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>