Changeset 14451

Show
Ignore:
Timestamp:
05/11/08 14:30:06 (2 months ago)
Author:
rouault
Message:

NITF : test the copy of a dataset with a LUT

Files:

Legend:

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

    r14448 r14451  
    562562        return 'fail' 
    563563 
     564    new_ds = drv.CreateCopy( 'tmp/test_29_copy.ntf', ds ) 
     565    new_ds = None 
     566    ds = None 
     567 
     568    ds = gdal.Open( 'tmp/test_29_copy.ntf' ) 
     569 
     570    ct = ds.GetRasterBand( 1 ).GetRasterColorTable() 
     571    if ct.GetCount() != 130 or \ 
     572       ct.GetColorEntry(0) != (255,255,255,255) or \ 
     573       ct.GetColorEntry(1) != (255,255,0,255) or \ 
     574       ct.GetColorEntry(2) != (255,0,255,255) or \ 
     575       ct.GetColorEntry(3) != (0,255,255,255): 
     576        gdaltest.post_reason( 'Wrong color table entry.' ) 
     577        return 'fail' 
     578 
    564579    ds = None 
    565580 
     
    771786    try: 
    772787        gdal.GetDriverByName('NITF').Delete( 'tmp/test_29.ntf' ) 
     788    except: 
     789        pass 
     790 
     791    try: 
     792        gdal.GetDriverByName('NITF').Delete( 'tmp/test_29_copy.ntf' ) 
    773793    except: 
    774794        pass