[gdal-dev] Overviews broken with PAM disabled

Gillian WALTER GWALTER at mdacorporation.com
Tue Jul 20 15:05:02 EDT 2010


Hi,

I built gdal 1.7.2 with PAM support disabled by default, and found that I could no longer build overviews for many formats.  When I set the environment variable GDAL_PAM_ENABLED=YES, the overviews would build.  I traced the problem down to the following section of GDALPamDataset::IBuildOverviews in gdalpamdataset.cpp:

PamInitialize();
if( psPam == NULL )
    return CE_None;

When I replaced this with:

PamInitialize();
if( psPam == NULL )
    return GDALDataset::IBuildOverviews( pszResampling, 
                                         nOverviews, panOverviewList, 
                                         nListBands, panBandList, 
                                         pfnProgress, pProgressData );

The overviews built again.  However, I don't know much about PAM and haven't ever worked with it enabled (aside from the current troubleshooting effort), so I don't know if this change would mess things up in some cases when PAM is enabled.

Is the above change OK, or should I also be adding a check that pszPamDefault is set to "NO", or something along those lines?

Thanks,

Gillian Walter
Software Developer
Geospatial Services Inc.
57 Auriga Drive - Suite 201
Ottawa, ON K2E 8B2
Telephone:  (613) 727-1087 #245
Facsimile:  (613) 727-5853
Email:  gwalter at mdacorporation.com

This e-mail and any attachments are intended solely for the use of the intended recipient(s) and may contain legally privileged, proprietary and/or confidential information.  Any use, disclosure, dissemination, distribution or copying of this e-mail and any attachments for any purposes that have not been specifically authorized by the sender is strictly prohibited.  If you are not the intended recipient, please immediately notify the sender by reply e-mail and permanently delete all copies and attachments.  The entire content of this e-mail is for "information purposes" only and should not be relied upon by the recipient in any way unless otherwise confirmed in writing by way of letter or facsimile.  

 



More information about the gdal-dev mailing list