Skip to content

Commit 0c73400

Browse files
fix(crs): add test_epsg to project file
1 parent 3007840 commit 0c73400

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

pzero/project_window.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,10 @@ def save_project(self):
13161316
"PZero project file saved in folder with the same name, including VTK files and CSV tables.\n"
13171317
)
13181318
fout.write("Last saved revision:\n")
1319-
fout.write("rev_" + now)
1319+
fout.write(f"rev_{now}\n")
1320+
fout.write("CRS EPSG:\n")
1321+
test_epsg = 'test_epsg'
1322+
fout.write(f"{test_epsg}\n")
13201323
fout.close()
13211324

13221325
# --------------------- SAVE LEGENDS ---------------------
@@ -1632,12 +1635,20 @@ def open_project(self):
16321635
# To open a different one, edit the project file.
16331636
# ___________________________________ IN THE FUTURE an option to open a specific revision could be added
16341637
fin = open(in_file_name, "rt")
1635-
rev_name = fin.readlines()[2].strip()
1638+
lines = fin.readlines()
1639+
rev_name = lines[2].strip()
1640+
try:
1641+
test_epsg = lines[4].strip()
1642+
except:
1643+
test_epsg = 'no_epsg'
16361644
fin.close()
16371645
in_dir_name = in_file_name[:-3] + "_p0/" + rev_name
16381646
self.print_terminal(
16391647
f"Opening project/revision : {in_file_name}/{rev_name}\n"
16401648
)
1649+
self.print_terminal(
1650+
f"Project CRS : {test_epsg}\n"
1651+
)
16411652
if not os_path.isdir(in_dir_name):
16421653
self.print_terminal(in_dir_name)
16431654
self.print_terminal("-- ERROR: missing folder --")

0 commit comments

Comments
 (0)