So i have a .txt data like this :
215951.113,9121874.519,0
215963.471,9121913.567,0
216613.129,9115925.135,0
...
And i want to write it in this format :
Point(1) = {219755.549,9129790.905,0}
Point(2) = {219754.857,9129793.278,0}
...
I made this kind of script :
f = open("D:\\TA\Input Data\Coastline\garpan_test.txt")
o = open("D:\\TA\Input Data\Coastline\garpan_test.geo","w+")
i = 1
for line in f :
o.write(f"Point({i})= {{line}}")
i=i+1
But instead it writes like this :
Point(1)= {219755.549,9129790.905,0
}Point(2)= {219754.857,9129793.278,0
}Point(3)= {219754.339,9129794.972,0
...
}Point(n)= {x,y}
I knew there is something wrong with the double curly brackets but i can't seem to find the same topic that explains it.. Any help is appreciated!