[gdal-dev] An error in building overviews for

Zhenyu Lu luzhenyu1981 at gmail.com
Thu Nov 11 21:11:55 EST 2010


Hi, Even:

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.
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);".
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.
Thanks a lot for all the help and information.


2010/11/12 Even Rouault <even.rouault at mines-paris.org>

> Zhenyu,
>
> gdaladdo is not a function. It is a command line utility that you should
> find
> with the other GDAL utilities.
>
> Le jeudi 11 novembre 2010 19:05:23, Zhenyu Lu a écrit :
>  > Hi, Even:
> >
> > Thanks for the information. I double checked the GDAL-1.5.2 compiled .net
> > dll. But I can't find the function named as gdaladdo. What I can only
> find
> > is three BuildOverviews function.
> > So I am confused whether there is such a function in GDAL-1.5.2. I will
> try
> > to test with GDAL-1.6 to see whether I can access such function.
> > Thanks,
> >
> > 2010/11/11 Even Rouault <even.rouault at mines-paris.org>
> >
> > > Actually, the HFA driver *does* support overviews. It isn't obvious why
> > > it does not work for you. Perhaps you should consider upgrading to a
> > > newer GDAL
> > > version, but I don't think this is an issue with GDAL 1.5.2. Does
> > > gdaladdo work on the dataset ? If so, then it must be rather related to
> > > something wrong
> > > in your code. The "int[] pOverviewList = { overView*2}" is a bit
> strange,
> > > but
> > > it is difficult to know without more context.
> > >
> > > Le jeudi 11 novembre 2010 08:00:15, Chaitanya kumar CH a écrit :
> > >  > Zhenyu,
> > > >
> > > > GDAL's HFA driver doesn't support creation of overviews. It can only
> > > > read them.
> > > >
> > > > On Thu, Nov 11, 2010 at 9:16 AM, Zhenyu Lu <luzhenyu1981 at gmail.com>
> > >
> > > wrote:
> > > > > Hi, all:
> > > > > I'm having an error while using function Dataset.BuildOverviews in
> my
> > > > > code. The error message is "BuildOverviews() not supported for this
> > > > > dataset". However, when I used the ".tif" file the BuildOverviews
> > >
> > > worked
> > >
> > > > > just fine. The
> > > > > code is:
> > > > > int[] pOverviewList = { overView*2};
> > > > > int[] pBandList = new int[dataset.RasterCount];
> > > > > int err = dataset.BuildOverviews("NEAREST", pOverviewList);
> > > > > if (err != (int)CPLErr.CE_None)
> > > > >
> > > > >       return null;
> > > > >
> > > > > I'm using GDAL1.5.2 and C#2.0. Is it because the HFA driver doesn't
> > > > > support overview? Or is it a bug? Can anyone pointed out where is
> my
> > > > > problem? Thanks a
> > > > > lot!
> > > > > --
> > > > > Zhenyu Lu
> > > > > SUNY-ESF
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > gdal-dev mailing list
> > > > > gdal-dev at lists.osgeo.org
> > > > > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Zhenyu Lu
SUNY-ESF
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101112/4f4eb039/attachment.html


More information about the gdal-dev mailing list