~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to frmts/aigrid/aigdataset.cpp

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: aigdataset.cpp 19497 2010-04-22 15:40:48Z warmerdam $
 
2
 * $Id: aigdataset.cpp 22103 2011-04-02 14:51:10Z warmerdam $
3
3
 *
4
4
 * Project:  Arc/Info Binary Grid Driver
5
5
 * Purpose:  Implements GDAL interface to underlying library.
34
34
#include "aigrid.h"
35
35
#include "avc.h"
36
36
 
37
 
CPL_CVSID("$Id: aigdataset.cpp 19497 2010-04-22 15:40:48Z warmerdam $");
 
37
CPL_CVSID("$Id: aigdataset.cpp 22103 2011-04-02 14:51:10Z warmerdam $");
38
38
 
39
39
CPL_C_START
40
40
void    GDALRegister_AIGrid(void);
216
216
        poODS->bHasReadRat = TRUE;
217
217
    }
218
218
 
219
 
    return poODS->poRAT;
 
219
    if( poODS->poRAT )
 
220
        return poODS->poRAT;
 
221
    else
 
222
        return GDALPamRasterBand::GetDefaultRAT();
220
223
}
221
224
 
222
225
/************************************************************************/
281
284
    if( poODS->poCT != NULL )
282
285
        return GCI_PaletteIndex;
283
286
    else
284
 
        return GCI_Undefined;
 
287
        return GDALPamRasterBand::GetColorInterpretation();
285
288
}
286
289
 
287
290
/************************************************************************/
293
296
{
294
297
    AIGDataset  *poODS = (AIGDataset *) poDS;
295
298
 
296
 
    return poODS->poCT;
 
299
    if( poODS->poCT != NULL )
 
300
        return poODS->poCT;
 
301
    else
 
302
        return GDALPamRasterBand::GetColorTable();
297
303
}
298
304
 
299
305
/************************************************************************/
558
564
    int iFile;
559
565
    int bGotOne = FALSE;
560
566
 
 
567
    if (papszFileList == NULL)
 
568
    {
 
569
        /* Useful when reading from /vsicurl/ on servers that don't */
 
570
        /* return a file list */
 
571
        /* such as /vsicurl/http://eros.usgs.gov/archive/nslrsda/GeoTowns/NLCD/89110458 */
 
572
        do
 
573
        {
 
574
            osTestName.Printf( "%s/W001001.ADF", osCoverName.c_str() );
 
575
            if( VSIStatL( osTestName, &sStatBuf ) == 0 )
 
576
            {
 
577
                bGotOne = TRUE;
 
578
                break;
 
579
            }
 
580
 
 
581
            osTestName.Printf( "%s/w001001.adf", osCoverName.c_str() );
 
582
            if( VSIStatL( osTestName, &sStatBuf ) == 0 )
 
583
            {
 
584
                bGotOne = TRUE;
 
585
                break;
 
586
            }
 
587
        } while(0);
 
588
    }
 
589
 
561
590
    for( iFile = 0; 
562
591
         papszFileList != NULL && papszFileList[iFile] != NULL && !bGotOne;
563
592
         iFile++ )
1014
1043
                                   "Arc/Info Binary Grid" );
1015
1044
        poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, 
1016
1045
                                   "frmt_various.html#AIG" );
 
1046
        poDriver->SetMetadataItem( GDAL_DCAP_VIRTUALIO, "YES" );
1017
1047
        
1018
1048
        poDriver->pfnOpen = AIGDataset::Open;
1019
1049