I have a raster dataset in ASCII format. Using Python, I need to determine the
max values inside the dataset. I've been told that the header information is key, which contains things like number of rows/columns, cell size, and etc. My question... can't you simply skip the header information and read the entire dataset to determine the
This is what I'm trying to do. I'm skipping the first couple of lines which contain the header information, and trying to determine the values from there on. The following is sort of what I have, but need some guidance as I am new to Python. Please excuse my mistakes.
raster_file = open('data.asc', 'r') # Open the file data = raster_file.readlines()[4:] # Read the lines in the file, and skip the first six lines for lines in data: print max(data) # Find the max value in data print min(data) # Find hte min value in data