I am importing ascii gridded files (.txt) into ArcMap to create a raster image. I am attempting to do as much as possible using Python code....but haven't got too far yet!
I am currently starting the process by appending the .hdr files to the .txt files. First I am manually converting the hdr file to txt, so I can append two txt files. (I would appreciate it if someone could suggest a quicker way to do this please. Can you append hdr to txt?).
I am then appending the two txt files individually using the following script:
filenames = ['hdr.txt', 'yyyymmout.txt'] with open("yyyymm_hdr", 'w') as outfile: for fname in filenames: with open(fname) as infile: for line in infile: outfile.write(line)
This script is working fine for the individual files, but I would like to attempt to do all the files within the script. I have a file for each month from 1900-2010....e.g. 1200+...
Thanks for your help