Changeset 13432
- Timestamp:
- 12/21/07 13:09:50 (5 months ago)
- Files:
-
- trunk/gdal/frmts/aaigrid/aaigriddataset.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/frmts/aaigrid/aaigriddataset.cpp
r13404 r13432 30 30 #include "gdal_pam.h" 31 31 #include <ctype.h> 32 #include <limits.h> 32 33 #include "cpl_string.h" 33 34 #include "ogr_spatialref.h" … … 380 381 char **papszTokens = NULL; 381 382 GDALDataType eDataType = GDT_Int16; 382 GDALDataType eNoDataType = GDT_Int16;383 383 384 384 /* -------------------------------------------------------------------- */ … … 483 483 poDS->bNoDataSet = TRUE; 484 484 poDS->dfNoDataValue = atof(pszNoData); 485 486 if( strchr(pszNoData, '.' ) != NULL )487 eNoDataType = GDT_Float32;488 485 } 489 486 … … 535 532 CPLAssert( NULL != poDS->fp ); 536 533 537 /* Use type of nodata value. */ 538 if( poDS->bNoDataSet && eNoDataType == GDT_Float32 ) 534 /* Use bigger data type. */ 535 if( poDS->bNoDataSet 536 && ( SHRT_MIN > poDS->dfNoDataValue || poDS->dfNoDataValue > SHRT_MAX) ) 539 537 { 540 538 eDataType = GDT_Float32;
