Skip to content

Commit

Permalink
Warn user if dataset contain no raster bands.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/gdal/trunk@5572 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
strezen committed Nov 28, 2003
1 parent 6291290 commit 4964e6f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frmts/pcidsk/pcidskdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
******************************************************************************
*
* $Log$
* Revision 1.9 2003/11/28 20:45:36 dron
* Warn user if dataset contain no raster bands.
*
* Revision 1.8 2003/10/29 16:38:56 warmerda
* set default extension
*
Expand Down Expand Up @@ -653,6 +656,7 @@ GDALDataset *PCIDSKDataset::Open( GDALOpenInfo * poOpenInfo )
if ( !EQUAL(pszFilename, "") )
{
CPLDebug( "PCIDSK", "pszFilename=%s", pszFilename );

if( poOpenInfo->eAccess == GA_ReadOnly )
fp = VSIFOpenL( pszFilename, "rb" );
else
Expand Down Expand Up @@ -759,6 +763,9 @@ GDALDataset *PCIDSKDataset::Open( GDALOpenInfo * poOpenInfo )
break;
}
}

if (!poDS->GetRasterCount())
CPLError(CE_Warning, CPLE_None, "Dataset contain no raster bands.");

/* ==================================================================== */
/* Read Segment Pointers. */
Expand Down

0 comments on commit 4964e6f

Please sign in to comment.