def selftest():
    BASENAME = "64883885"
    HOMEAREA = "./data/"+BASENAME
    
    gf = GridFloat(HOMEAREA, BASENAME)
    
    print gf
    print gf.extent
    
    toprow = [gf.cell(x, 0) for x in range(gf.ncols)]
    assert gf.elevation( gf.left, gf.top )==toprow[0]
    assert round(gf.elevation( gf.right-0.00000000001, gf.top ),5)==round(toprow[-1],5)
    
    bottomrow = [gf.cell(x,gf.nrows-2) for x in range(gf.ncols)]
    assert gf.elevation( gf.left, gf.bottom+0.000000001 ) == bottomrow[0]
    assert gf.elevation( gf.right-0.00000001, gf.bottom+0.00000001 ) == bottomrow[-2]
    
    assert gf.extremes() == (4.7509551048278809, 144.3404541015625)
    
    assert round(gf.elevation( (gf.right-gf.left)/2+gf.left, (gf.top-gf.bottom)/2+gf.bottom ),6) == round(89.278957367,6)
dataset/ETHPy150Open bmander/graphserver/pygs/graphserver/ext/ned/elevation/elevation.py/selftest/original