def netcdf_cf_1(): #setup netcdf and netcdf_cf environment netcdf_setup() netcdf_cf_setup() if gdaltest.netcdf_drv is None: return 'skip' tst1 = gdaltest.GDALTest('NETCDF', 'trmm.tif', 1, 14) result = tst1.testCreateCopy(check_gt=1, check_srs=1, new_filename='tmp/netcdf_cf_1.nc', delete_copy=0) if result != 'fail': tst2 = gdaltest.GDALTest('GTIFF', '../tmp/netcdf_cf_1.nc', 1, 14) result = tst2.testCreateCopy(check_gt=1, check_srs=1, new_filename='tmp/netcdf_cf_1.tiff', delete_copy=0) result_cf = 'success' if gdaltest.netcdf_cf_method is not None: result_cf = netcdf_cf_check_file('tmp/netcdf_18.nc', 'auto', False) if result != 'fail' and result_cf != 'fail': return 'success' else: return 'fail'
def netcdf_cf_1(): #setup netcdf and netcdf_cf environment netcdf_setup() netcdf_cf_setup() if gdaltest.netcdf_drv is None: return 'skip' #tst1 = gdaltest.GDALTest( 'NETCDF', 'trmm.tif', 1, 14 ) #result = tst1.testCreateCopy(check_gt=1, check_srs=1, new_filename='tmp/netcdf_cf_1.nc', delete_copy = 0) result = netcdf_test_copy( 'data/trmm.nc', 1, 14, 'tmp/netcdf_cf_1.nc' ) if result != 'fail': #tst2 = gdaltest.GDALTest( 'GTIFF', '../tmp/netcdf_cf_1.nc', 1, 14 ) #result = tst2.testCreateCopy(check_gt=1, check_srs=1, new_filename='tmp/netcdf_cf_1.tiff', delete_copy = 0) result = netcdf_test_copy( 'tmp/netcdf_cf_1.nc', 1, 14, 'tmp/netcdf_cf_1.tif', [], 'GTIFF' ) result_cf = 'success' if gdaltest.netcdf_cf_method is not None: result_cf = netcdf_cf_check_file( 'tmp/netcdf_18.nc','auto',False ) if result != 'fail' and result_cf != 'fail': return 'success' else: return 'fail'