Changeset 12456

Show
Ignore:
Timestamp:
10/17/07 11:15:50 (1 year ago)
Author:
mloskot
Message:

Test computation of Min/Max for sombrero.grd (Ticket #1595).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/autotest/gdrivers/netcdf.py

    r11391 r12456  
    103103 
    104104    return 'success' 
     105 
     106############################################################################### 
     107 
     108def netcdf_3(): 
     109 
     110    if gdaltest.netcdf_drv is None: 
     111        return 'skip' 
     112 
     113    ds = gdal.Open( 'data/sombrero.grd' ) 
     114    bnd = ds.GetRasterBand(1) 
     115    minmax = bnd.ComputeRasterMinMax() 
     116 
     117    if abs(minmax[0] - (-0.675758)) > 0.000001 or abs(minmax[1] - 1.0) > 0.000001: 
     118        gdaltest.post_reason( 'Wrong min or max.' ) 
     119        return 'fail' 
     120 
     121    bnd = None 
     122    ds = None 
     123 
     124    return 'success' 
    105125     
     126############################################################################### 
     127 
    106128gdaltest_list = [ 
    107129    netcdf_1, 
    108     netcdf_2 ] 
     130    netcdf_2, 
     131    netcdf_3 ] 
    109132 
    110133