<div>Hi, Even: </div>
<div> </div>
<div>I have used the tool you mentioned. There is a gdaladdo utility in GDAL1.5.2. But still it didn't work with the .img file in my computer. </div>
<div>Then I realized that since I've used these .img files in ArcGIS and Erdas before. These software must automatically create the .rrd files. That explains why I can't use the following code "dataset.BuildOverviews("NEAREST", pOverviewList);". </div>
<div>It turns out to be that the reason why the ".tif" file works using the previous code is because there is a .aux file together with the .rrd file. It seems that the .aux file can be both read and written. </div>
<div>Thanks a lot for all the help and information.</div>
<div> </div>
<div> </div>
<div class="gmail_quote">2010/11/12 Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Zhenyu,<br><br>gdaladdo is not a function. It is a command line utility that you should find<br>with the other GDAL utilities.<br>
<br>Le jeudi 11 novembre 2010 19:05:23, Zhenyu Lu a écrit :<br>
<div>
<div></div>
<div class="h5">> Hi, Even:<br>><br>> Thanks for the information. I double checked the GDAL-1.5.2 compiled .net<br>> dll. But I can't find the function named as gdaladdo. What I can only find<br>> is three BuildOverviews function.<br>
> So I am confused whether there is such a function in GDAL-1.5.2. I will try<br>> to test with GDAL-1.6 to see whether I can access such function.<br>> Thanks,<br>><br>> 2010/11/11 Even Rouault <<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>><br>
><br>> > Actually, the HFA driver *does* support overviews. It isn't obvious why<br>> > it does not work for you. Perhaps you should consider upgrading to a<br>> > newer GDAL<br>> > version, but I don't think this is an issue with GDAL 1.5.2. Does<br>
> > gdaladdo work on the dataset ? If so, then it must be rather related to<br>> > something wrong<br>> > in your code. The "int[] pOverviewList = { overView*2}" is a bit strange,<br>> > but<br>
> > it is difficult to know without more context.<br>> ><br>> > Le jeudi 11 novembre 2010 08:00:15, Chaitanya kumar CH a écrit :<br>> > > Zhenyu,<br>> > ><br>> > > GDAL's HFA driver doesn't support creation of overviews. It can only<br>
> > > read them.<br>> > ><br>> > > On Thu, Nov 11, 2010 at 9:16 AM, Zhenyu Lu <<a href="mailto:luzhenyu1981@gmail.com">luzhenyu1981@gmail.com</a>><br>> ><br>> > wrote:<br>> > > > Hi, all:<br>
> > > > I'm having an error while using function Dataset.BuildOverviews in my<br>> > > > code. The error message is "BuildOverviews() not supported for this<br>> > > > dataset". However, when I used the ".tif" file the BuildOverviews<br>
> ><br>> > worked<br>> ><br>> > > > just fine. The<br>> > > > code is:<br>> > > > int[] pOverviewList = { overView*2};<br>> > > > int[] pBandList = new int[dataset.RasterCount];<br>
> > > > int err = dataset.BuildOverviews("NEAREST", pOverviewList);<br>> > > > if (err != (int)CPLErr.CE_None)<br>> > > ><br>> > > > return null;<br>> > > ><br>
> > > > I'm using GDAL1.5.2 and C#2.0. Is it because the HFA driver doesn't<br>> > > > support overview? Or is it a bug? Can anyone pointed out where is my<br>> > > > problem? Thanks a<br>
> > > > lot!<br>> > > > --<br>> > > > Zhenyu Lu<br>> > > > SUNY-ESF<br>> > > ><br>> > > ><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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>
<div>Zhenyu Lu</div>
<div>SUNY-ESF</div><br>