k1012593

Python confussion: creating new X,Y coordinates !

Discussion created by k1012593 on Dec 19, 2011
Latest reply on Dec 20, 2011 by k1012593
I have a text file like this:
Siteid: 1
Condition: good
X coordinate: 433207.8362 Y coordinate: 4518107.044

Trying to work out a square plot of  20m x 20m for each point and to present the coordinates as a text file !!



# Read entire file and print one line at a time
for line in inFile.readlines():
    nestList = line.split(",")
    id = nestList[0]
    cnd = nestList[1]
    x = nestList[2]
    y = nestList[3]
    outFile.write("Siteid: " + id + "\n")
    outFile.write("Condition: " + cnd + "\n")
    outFile.write("X Coordinate: " + x + "\n")
    outFile.write("Y Coordinate: " + y + "\n")
    outFile.write("\n")
print "the file nests2005 has been read and printed"


# Close the files
inFile.close()
outFile.close()

Outcomes