Opened 13 years ago

Closed 13 years ago

#2854 closed defect (fixed)

Overview is AUX

Reported by: gaopeng Owned by: warmerdam
Priority: normal Milestone: 1.6.1
Component: GDAL_Raster Version: 1.6.0
Severity: normal Keywords: overviews
Cc:

Description

If I have a raster dataset, e.g. a GRID, which has an associated .AUX file, gdaldefaultoverviews will consider the dataset has an AUX type of overview, even if there is actually no overview contained in the AUX file. If I build overviews for this grid, I will get a .rrd instead of an .ovr ("USE_RRD" is NO).

Is it possible to ignore .aux that contains no overviews, and build .ovr for all formats, except img, if USE_RRD=NO?

Change History (2)

comment:1 Changed 13 years ago by warmerdam

Component: defaultGDAL_Raster
Keywords: overviews added
Owner: changed from Frank Warmerdam to warmerdam
Status: newassigned

A possible patch to accomplish this in gdaldefaultoverviews.cpp:

    if( !poODS )
    {
        poODS = GDALFindAssociatedAuxFile( pszBasename, poDS->GetAccess(),
                                           poDS );

        if( poODS )
        {
            bOvrIsAux = TRUE;
            if( GetOverviewCount(1) == 0 )
            {
                GDALClose( poODS );
                poODS = NULL;
                bOvrIsAux = FALSE;
           }
           else
               osOvrFilename = poODS->GetDescription();
        }
    }

comment:2 Changed 13 years ago by warmerdam

Resolution: fixed
Status: assignedclosed

I have applied a slight variation on this patch in trunk (r16418) and 1.6 branch (r16419) which will still use the .aux or .rrd if USE_RRD is set TRUE.

I have no, unfortunately, added a test case for this new behavior.

Note: See TracTickets for help on using tickets.