2019-12-28 21:40:34 +08:00
|
|
|
# 用于处理勘测的文件
|
|
|
|
|
from file_object import CordinationObject
|
|
|
|
|
|
|
|
|
|
# 在道亨的ORG文件里面添加测量的桩位
|
|
|
|
|
def output_pile(cordination_file, output_file):
|
|
|
|
|
cord_file_object = CordinationObject(cordination_file)
|
|
|
|
|
out_content = cord_file_object.content()
|
|
|
|
|
with open(output_file, "w") as out_file:
|
|
|
|
|
for c in out_content:
|
|
|
|
|
out_file.write(
|
|
|
|
|
"0,{pile},0.0000,{mileage},{altitude}, 96=00+ 96, 0.0000, 0.0000\n".format(
|
|
|
|
|
pile=c[0], altitude=c[1], mileage=c[2]
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2020-02-04 22:18:42 +08:00
|
|
|
# output_pile(r"d:\工程\灵州-青山\排位\道亨\成果表.csv", r"d:\工程\灵州-青山\排位\道亨\最终排位\org_append.TA")
|
2020-11-14 16:21:08 +08:00
|
|
|
output_pile(
|
|
|
|
|
r"d:\工程\灵州-青山\排位\道亨\最终排位\成果表-0120.csv", r"d:\工程\灵州-青山\排位\道亨\最终排位\org_append.txt"
|
|
|
|
|
)
|
2019-12-28 21:40:34 +08:00
|
|
|
print("survey. Finished.")
|