Skip to content

Commit

Permalink
PDS3: add support for ENCODING_TYPE=DCT_DECOMPRESSED (fixes #1457)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Apr 18, 2019
1 parent 0e555ef commit 7d4fe9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gdal/frmts/pds/pdsdataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,16 +730,18 @@ int PDSDataset::ParseImage( CPLString osPrefix, CPLString osFilenamePrefix )
/* -------------------------------------------------------------------- */
/* Checks to see if this is raw PDS image not compressed image */
/* so ENCODING_TYPE either does not exist or it equals "N/A". */
/* or "DCT_DECOMPRESSED". */
/* Compressed types will not be supported in this routine */
/* -------------------------------------------------------------------- */

CPLString osEncodingType = GetKeyword(osPrefix+"IMAGE.ENCODING_TYPE","N/A");
CleanString(osEncodingType);
if ( !EQUAL(osEncodingType.c_str(),"N/A") )
if ( !EQUAL(osEncodingType,"N/A") &&
!EQUAL(osEncodingType,"DCT_DECOMPRESSED") )
{
CPLError( CE_Failure, CPLE_OpenFailed,
"*** PDS image file has an ENCODING_TYPE parameter:\n"
"*** gdal pds driver does not support compressed image types\n"
"*** GDAL PDS driver does not support compressed image types\n"
"found: (%s)\n\n", osEncodingType.c_str() );
return FALSE;
}
Expand Down

0 comments on commit 7d4fe9a

Please sign in to comment.