def _read_header(self, filename):
        HCW = 15 #header column width
        
        fp = open( filename, "r" )
        
        raw_header = dict([x.strip().split() for x in fp.read().strip().split("\n")])
        
        self.byteorder     = "<" if raw_header['BYTEORDER']=="I" else ">"
        self.layout        = raw_header['LAYOUT']
        self.ncols         = int( raw_header['NCOLS'] )
        self.nrows         = int( raw_header['NROWS'] )
        self.nbands        = int( raw_header['NBANDS'] )
        self.nbits         = int( raw_header['NBITS'] )
        self.bandrowbytes  = int( raw_header['BANDROWBYTES'] )
        self.totalrowbytes = int( raw_header['TOTALROWBYTES'] )
        self.pixeltype     = raw_header['PIXELTYPE']
        self.ulxmap        = float( raw_header['ULXMAP'] )
        self.ulymap        = float( raw_header['ULYMAP'] )
        self.xdim          = float( raw_header['XDIM'] )
        self.ydim          = float( raw_header['YDIM'] )
        self.nodata        = float( raw_header['NODATA'] )
        
        self.left = self.ulxmap
        self.right = self.ulxmap + (self.ncols-1)*self.xdim
        self.bottom = self.ulymap - (1-self.nrows)*self.ydim
        self.top = self.ulymap
dataset/ETHPy150Open bmander/graphserver/pygs/graphserver/ext/ned/elevation/elevation.py/BIL._read_header/swapped operands of `-`