diff --git a/borea/datastruct/dtm.py b/borea/datastruct/dtm.py
index 8a4dfa8c..b5ecfa4c 100644
--- a/borea/datastruct/dtm.py
+++ b/borea/datastruct/dtm.py
@@ -1,11 +1,11 @@
"""
A module for manipulating a digital elevation model.
"""
-from pathlib import Path, PureWindowsPath
import numpy as np
from osgeo import gdal
from scipy import ndimage
from borea.transform_world_image.transform_dtm.world_image_dtm import WorldImageDtm
+from borea.utils.check.check_path import check_path
from borea.utils.singleton.singleton import Singleton
gdal.UseExceptions()
@@ -49,7 +49,7 @@ def set_dtm(self, path_dtm: str, type_dtm: str) -> None:
if path_dtm:
gdal.AllRegister()
self.type_dtm = type_dtm
- self.path_dtm = Path(PureWindowsPath(path_dtm))
+ self.path_dtm = check_path(path_dtm)
self.img = gdal.Open(self.path_dtm.as_posix())
self.rb = self.img.GetRasterBand(1)
self.nodata = self.rb.GetNoDataValue()
diff --git a/borea/reader/orientation/manage_reader.py b/borea/reader/orientation/manage_reader.py
index 2f362436..2b1bb802 100644
--- a/borea/reader/orientation/manage_reader.py
+++ b/borea/reader/orientation/manage_reader.py
@@ -2,7 +2,7 @@
Photogrammetry site file reader module.
"""
import importlib
-from pathlib import Path, PureWindowsPath
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
@@ -19,7 +19,7 @@ def reader_orientation(file: str, args: dict) -> Worksite:
"""
# Attention multiple file management orientation
# Attention management of files with the same extension but different formats
- file = Path(PureWindowsPath(file))
+ file = check_path(file)
name_work = file.stem
ext = file.suffix[1:]
diff --git a/borea/reader/reader_camera.py b/borea/reader/reader_camera.py
index 937bbff8..e0cfdcd3 100644
--- a/borea/reader/reader_camera.py
+++ b/borea/reader/reader_camera.py
@@ -1,8 +1,9 @@
"""
Script to read camera file txt or xml.
"""
-from pathlib import Path, PureWindowsPath
+from pathlib import Path
from borea.datastruct.camera import Camera
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
@@ -15,7 +16,7 @@ def read_camera(files: list, work: Worksite) -> None:
work (Worksite): Worksite which needs camera data.
"""
for file in files:
- camera_txt(Path(PureWindowsPath(file)), work)
+ camera_txt(check_path(file), work)
def camera_txt(file: Path, work: Worksite) -> None:
diff --git a/borea/reader/reader_point.py b/borea/reader/reader_point.py
index 5f5e1650..86d96ba1 100644
--- a/borea/reader/reader_point.py
+++ b/borea/reader/reader_point.py
@@ -2,9 +2,9 @@
Script to read point (connecting point, gcp2d gcp3d) format
.txt/.mes/.app with data arranged in columns.
"""
-from pathlib import Path, PureWindowsPath
import pandas as pd
import numpy as np
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.utils.check.check_args_reader_pt import check_header_file
@@ -26,7 +26,7 @@ def read_file_pt(path: str, header: list, type_point: str, work: Worksite) -> No
work.type_z_data = type_z
try:
- with open(Path(PureWindowsPath(path)), 'r', encoding="utf-8") as file_pts:
+ with open(check_path(path), 'r', encoding="utf-8") as file_pts:
for pt in file_pts.readlines():
if pt != '\n' and pt[0] != '#':
info = pt.split()
@@ -74,7 +74,7 @@ def read_file_pt_dataframe(path: str, header: list, type_point: str) -> tuple:
ttype = []
coor = []
try:
- with open(Path(PureWindowsPath(path)), 'r', encoding="utf-8") as file_pts:
+ with open(check_path(path), 'r', encoding="utf-8") as file_pts:
for pt in file_pts.readlines():
if pt != '\n' and pt[0] != '#':
info = pt.split()
diff --git a/borea/stat/statistics.py b/borea/stat/statistics.py
index bf40b2df..6a3f7d94 100644
--- a/borea/stat/statistics.py
+++ b/borea/stat/statistics.py
@@ -3,8 +3,8 @@
"""
import os
import io
-from pathlib import Path, PureWindowsPath
import numpy as np
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
@@ -22,7 +22,7 @@ def __init__(self, work: Worksite, pathoutput: str, type_point: list = None) ->
type_point (list): List of type point on which we make the stats.
"""
self.work = work
- self.pathoutput = Path(PureWindowsPath(pathoutput))
+ self.pathoutput = check_path(pathoutput)
if type_point is None:
self.type_point = []
diff --git a/borea/utils/check/check_path.py b/borea/utils/check/check_path.py
new file mode 100644
index 00000000..dd8ab826
--- /dev/null
+++ b/borea/utils/check/check_path.py
@@ -0,0 +1,26 @@
+"""
+Script to check path of data.
+"""
+from pathlib import Path, PureWindowsPath, PurePosixPath
+
+
+def check_path(file: str) -> Path:
+ """
+ Check path of data if Posix of Windows path.
+
+ Args:
+ file (str): The path of data.
+
+ Returns:
+ Path: The good path.
+ """
+ file = Path(file)
+ name = file.stem
+
+ if "/" in name:
+ return Path(PurePosixPath(file))
+
+ if "\\" in name:
+ return Path(PureWindowsPath(file))
+
+ return file
diff --git a/borea/writer/writer_con.py b/borea/writer/writer_con.py
index be6ad2de..791098b8 100644
--- a/borea/writer/writer_con.py
+++ b/borea/writer/writer_con.py
@@ -2,7 +2,7 @@
Photogrammetry worksite to writing in rpc.
"""
import os
-from pathlib import Path, PureWindowsPath
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.geodesy.proj_engine import ProjEngine
from borea.format.conl import Conl
@@ -31,6 +31,6 @@ def write(name: str, folder_con: str, param_con: dict, work: Worksite) -> None:
for name_shot, shot in work.shots.items():
cam = work.cameras[shot.name_cam]
- path_conical = os.path.join(Path(PureWindowsPath(folder_con)), f"{name_shot}.CON")
+ path_conical = os.path.join(check_path(folder_con), f"{name_shot}.CON")
Conl(shot, cam, geoview_proj).save_conl(path_conical)
diff --git a/borea/writer/writer_df_to_txt.py b/borea/writer/writer_df_to_txt.py
index 7b75422b..904acb18 100644
--- a/borea/writer/writer_df_to_txt.py
+++ b/borea/writer/writer_df_to_txt.py
@@ -2,8 +2,8 @@
Photogrammetry worksite to writing dataframe to txt.
"""
import os
-from pathlib import Path, PureWindowsPath
import pandas as pd
+from borea.utils.check.check_path import check_path
def write_df_to_txt(name: str, pathreturn: str, df: pd.DataFrame) -> None:
@@ -15,7 +15,7 @@ def write_df_to_txt(name: str, pathreturn: str, df: pd.DataFrame) -> None:
pathreturn (str): Path to save the file.
df (pd.DataFrame): DataFrame to save.
"""
- path_txt = os.path.join(Path(PureWindowsPath(pathreturn)), f"{name}.txt")
+ path_txt = os.path.join(check_path(pathreturn), f"{name}.txt")
name_column = list(df.columns)
diff --git a/borea/writer/writer_opk.py b/borea/writer/writer_opk.py
index 553a4021..9d6ea0bb 100644
--- a/borea/writer/writer_opk.py
+++ b/borea/writer/writer_opk.py
@@ -2,8 +2,8 @@
Photogrammetry worksite to writing in opk.
"""
import os
-from pathlib import Path, PureWindowsPath
import numpy as np
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.utils.check.check_args_opk import check_header_file
@@ -24,7 +24,7 @@ def write(name_opk: str, path_opk: str, args: dict, work: Worksite) -> None:
linear alteration.
work (Worksite): The site to be recorded.
"""
- path_opk = os.path.join(Path(PureWindowsPath(path_opk)), f"{name_opk}.opk")
+ path_opk = os.path.join(check_path(path_opk), f"{name_opk}.opk")
if args["header"]:
header, type_z = check_header_file(args["header"])
diff --git a/borea/writer/writer_rpc.py b/borea/writer/writer_rpc.py
index 24e4daba..3f141056 100644
--- a/borea/writer/writer_rpc.py
+++ b/borea/writer/writer_rpc.py
@@ -2,8 +2,8 @@
Photogrammetry worksite to writing in rpc.
"""
import os
-from pathlib import Path, PureWindowsPath
from borea.format.rpc import Rpc
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.datastruct.dtm import Dtm
@@ -53,6 +53,6 @@ def write(name: str, folder_rpc: str, param_rpc: dict, work: Worksite) -> None:
for idx, val in enumerate(rpc.param_rpc["SAMP_DEN_COEFF"]):
list_txt_rpc += [f"SAMP_DEN_COEFF_{idx + 1}: {val}"]
- path_rpc = os.path.join(Path(PureWindowsPath(folder_rpc)),
+ path_rpc = os.path.join(check_path(folder_rpc),
f"{name_shot}_RPC.TXT")
- Path(path_rpc).write_text("\n".join(list_txt_rpc), encoding="UTF-8")
+ check_path(path_rpc).write_text("\n".join(list_txt_rpc), encoding="UTF-8")
diff --git a/docs/sphinx/_build/doctrees/borea.utils.check.doctree b/docs/sphinx/_build/doctrees/borea.utils.check.doctree
index 4080608b..709e4320 100644
Binary files a/docs/sphinx/_build/doctrees/borea.utils.check.doctree and b/docs/sphinx/_build/doctrees/borea.utils.check.doctree differ
diff --git a/docs/sphinx/_build/doctrees/borea.utils.solver.doctree b/docs/sphinx/_build/doctrees/borea.utils.solver.doctree
index 5c60deab..834c2985 100644
Binary files a/docs/sphinx/_build/doctrees/borea.utils.solver.doctree and b/docs/sphinx/_build/doctrees/borea.utils.solver.doctree differ
diff --git a/docs/sphinx/_build/doctrees/environment.pickle b/docs/sphinx/_build/doctrees/environment.pickle
index f489c1c7..5f7978e7 100644
Binary files a/docs/sphinx/_build/doctrees/environment.pickle and b/docs/sphinx/_build/doctrees/environment.pickle differ
diff --git a/docs/sphinx/_build/html/_modules/borea/datastruct/camera.html b/docs/sphinx/_build/html/_modules/borea/datastruct/camera.html
index 23b2e1fc..3b07747d 100644
--- a/docs/sphinx/_build/html/_modules/borea/datastruct/camera.html
+++ b/docs/sphinx/_build/html/_modules/borea/datastruct/camera.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/datastruct/dtm.html b/docs/sphinx/_build/html/_modules/borea/datastruct/dtm.html
index 888140f8..352bbee3 100644
--- a/docs/sphinx/_build/html/_modules/borea/datastruct/dtm.html
+++ b/docs/sphinx/_build/html/_modules/borea/datastruct/dtm.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+borea.utils.solver package
borea.utils.xml package
@@ -275,11 +276,11 @@ Source code for borea.datastruct.dtm
"""
A module for manipulating a digital elevation model.
"""
-from pathlib import Path , PureWindowsPath
import numpy as np
from osgeo import gdal
from scipy import ndimage
from borea.transform_world_image.transform_dtm.world_image_dtm import WorldImageDtm
+from borea.utils.check.check_path import check_path
from borea.utils.singleton.singleton import Singleton
gdal . UseExceptions ()
@@ -327,7 +328,7 @@ Source code for borea.datastruct.dtm
if path_dtm :
gdal . AllRegister ()
self . type_dtm = type_dtm
- self . path_dtm = Path ( PureWindowsPath ( path_dtm ))
+ self . path_dtm = check_path ( path_dtm )
self . img = gdal . Open ( self . path_dtm . as_posix ())
self . rb = self . img . GetRasterBand ( 1 )
self . nodata = self . rb . GetNoDataValue ()
diff --git a/docs/sphinx/_build/html/_modules/borea/datastruct/gcp.html b/docs/sphinx/_build/html/_modules/borea/datastruct/gcp.html
index 416cc8c6..bc052851 100644
--- a/docs/sphinx/_build/html/_modules/borea/datastruct/gcp.html
+++ b/docs/sphinx/_build/html/_modules/borea/datastruct/gcp.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/datastruct/shot.html b/docs/sphinx/_build/html/_modules/borea/datastruct/shot.html
index dc1965ee..d4da668f 100644
--- a/docs/sphinx/_build/html/_modules/borea/datastruct/shot.html
+++ b/docs/sphinx/_build/html/_modules/borea/datastruct/shot.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/datastruct/workdata.html b/docs/sphinx/_build/html/_modules/borea/datastruct/workdata.html
index 5e565e19..f3ec3b03 100644
--- a/docs/sphinx/_build/html/_modules/borea/datastruct/workdata.html
+++ b/docs/sphinx/_build/html/_modules/borea/datastruct/workdata.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/format/conl.html b/docs/sphinx/_build/html/_modules/borea/format/conl.html
index 7531774e..12fb2a9c 100644
--- a/docs/sphinx/_build/html/_modules/borea/format/conl.html
+++ b/docs/sphinx/_build/html/_modules/borea/format/conl.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/format/rpc.html b/docs/sphinx/_build/html/_modules/borea/format/rpc.html
index 4ec50f76..d63e49a2 100644
--- a/docs/sphinx/_build/html/_modules/borea/format/rpc.html
+++ b/docs/sphinx/_build/html/_modules/borea/format/rpc.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/geodesy/approx_euclidean_proj.html b/docs/sphinx/_build/html/_modules/borea/geodesy/approx_euclidean_proj.html
index dfa74200..4f51813e 100644
--- a/docs/sphinx/_build/html/_modules/borea/geodesy/approx_euclidean_proj.html
+++ b/docs/sphinx/_build/html/_modules/borea/geodesy/approx_euclidean_proj.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/geodesy/euclidean_proj.html b/docs/sphinx/_build/html/_modules/borea/geodesy/euclidean_proj.html
index 6a2521f8..381c9ded 100644
--- a/docs/sphinx/_build/html/_modules/borea/geodesy/euclidean_proj.html
+++ b/docs/sphinx/_build/html/_modules/borea/geodesy/euclidean_proj.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/geodesy/local_euclidean_proj.html b/docs/sphinx/_build/html/_modules/borea/geodesy/local_euclidean_proj.html
index af7b2b6e..8293b79c 100644
--- a/docs/sphinx/_build/html/_modules/borea/geodesy/local_euclidean_proj.html
+++ b/docs/sphinx/_build/html/_modules/borea/geodesy/local_euclidean_proj.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/geodesy/proj_engine.html b/docs/sphinx/_build/html/_modules/borea/geodesy/proj_engine.html
index 2ff8f1de..1d221ab9 100644
--- a/docs/sphinx/_build/html/_modules/borea/geodesy/proj_engine.html
+++ b/docs/sphinx/_build/html/_modules/borea/geodesy/proj_engine.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/geodesy/projectionlist/search_proj.html b/docs/sphinx/_build/html/_modules/borea/geodesy/projectionlist/search_proj.html
index c4245ce8..bb6d9674 100644
--- a/docs/sphinx/_build/html/_modules/borea/geodesy/projectionlist/search_proj.html
+++ b/docs/sphinx/_build/html/_modules/borea/geodesy/projectionlist/search_proj.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/geodesy/transform_geodesy.html b/docs/sphinx/_build/html/_modules/borea/geodesy/transform_geodesy.html
index 14cce1c0..a0719916 100644
--- a/docs/sphinx/_build/html/_modules/borea/geodesy/transform_geodesy.html
+++ b/docs/sphinx/_build/html/_modules/borea/geodesy/transform_geodesy.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_add_shot.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_add_shot.html
index 9cfc6cd7..6831b771 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_add_shot.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_add_shot.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp2d.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp2d.html
index 4c487368..55491adf 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp2d.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp2d.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp3d.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp3d.html
index 8a2119d4..08fd0a5d 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp3d.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_file_gcp3d.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_gen_param.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_gen_param.html
index 103a7991..6072cc86 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_gen_param.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_gen_param.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_proj.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_proj.html
index e65ae134..7793b620 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_proj.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_proj.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt2d.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt2d.html
index ba852a7b..484fb486 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt2d.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt2d.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt3d.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt3d.html
index 6dc78fd4..a3ff52fc 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt3d.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_pt3d.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_unit_shot.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_unit_shot.html
index aeaf34e6..64732933 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_unit_shot.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_unit_shot.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_write.html b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_write.html
index 3caffdc9..5fb2d453 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_write.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_add_data/p_write.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_read_opk.html b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_read_opk.html
index 233ffe7f..4d1fd325 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_read_opk.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_read_opk.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_con.html b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_con.html
index be119a1e..cc2dde8d 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_con.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_con.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_opk.html b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_opk.html
index 6b91dc42..4d59e967 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_opk.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_opk.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_rpc.html b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_rpc.html
index d82177f0..db111c69 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_rpc.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_format/p_write_rpc.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_control.html b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_control.html
index b9116344..0de09cce 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_control.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_control.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_image_world.html b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_image_world.html
index 4bf5b1ee..882723ec 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_image_world.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_image_world.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_spaceresection.html b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_spaceresection.html
index da4d76a5..26f26089 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_spaceresection.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_spaceresection.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_tf_proj_pt.html b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_tf_proj_pt.html
index a3d554b5..683d71f8 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_tf_proj_pt.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_tf_proj_pt.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_world_image.html b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_world_image.html
index 3f42423b..74596519 100644
--- a/docs/sphinx/_build/html/_modules/borea/process/p_func/p_world_image.html
+++ b/docs/sphinx/_build/html/_modules/borea/process/p_func/p_world_image.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/reader/orientation/manage_reader.html b/docs/sphinx/_build/html/_modules/borea/reader/orientation/manage_reader.html
index 0536c874..d647b09f 100644
--- a/docs/sphinx/_build/html/_modules/borea/reader/orientation/manage_reader.html
+++ b/docs/sphinx/_build/html/_modules/borea/reader/orientation/manage_reader.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -276,7 +277,7 @@
Source code for borea.reader.orientation.manage_reader Photogrammetry site file reader module.
"""
import importlib
-
from pathlib import Path , PureWindowsPath
+
from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
@@ -295,7 +296,7 @@
Source code for borea.reader.orientation.manage_reader """
# Attention multiple file management orientation
# Attention management of files with the same extension but different formats
-
file = Path ( PureWindowsPath ( file ))
+
file = check_path ( file )
name_work = file . stem
ext = file . suffix [ 1 :]
diff --git a/docs/sphinx/_build/html/_modules/borea/reader/orientation/reader_opk.html b/docs/sphinx/_build/html/_modules/borea/reader/orientation/reader_opk.html
index f0328e6b..b9ff9b80 100644
--- a/docs/sphinx/_build/html/_modules/borea/reader/orientation/reader_opk.html
+++ b/docs/sphinx/_build/html/_modules/borea/reader/orientation/reader_opk.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/reader/reader_camera.html b/docs/sphinx/_build/html/_modules/borea/reader/reader_camera.html
index 1dc93027..b7a66cf7 100644
--- a/docs/sphinx/_build/html/_modules/borea/reader/reader_camera.html
+++ b/docs/sphinx/_build/html/_modules/borea/reader/reader_camera.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -275,8 +276,9 @@
Source code for borea.reader.reader_camera
"""
Script to read camera file txt or xml.
"""
-from pathlib import Path , PureWindowsPath
+from pathlib import Path
from borea.datastruct.camera import Camera
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
@@ -291,7 +293,7 @@ Source code for borea.reader.reader_camera
work (Worksite): Worksite which needs camera data.
"""
for file in files :
- camera_txt ( Path ( PureWindowsPath ( file )), work )
+ camera_txt ( check_path ( file ), work )
diff --git a/docs/sphinx/_build/html/_modules/borea/reader/reader_point.html b/docs/sphinx/_build/html/_modules/borea/reader/reader_point.html
index 4de82430..eecdbf44 100644
--- a/docs/sphinx/_build/html/_modules/borea/reader/reader_point.html
+++ b/docs/sphinx/_build/html/_modules/borea/reader/reader_point.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -276,9 +277,9 @@
Source code for borea.reader.reader_point
Script to read point (connecting point, gcp2d gcp3d) format
.txt/.mes/.app with data arranged in columns.
"""
-from pathlib import Path , PureWindowsPath
import pandas as pd
import numpy as np
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.utils.check.check_args_reader_pt import check_header_file
@@ -302,7 +303,7 @@ Source code for borea.reader.reader_point
work . type_z_data = type_z
try :
- with open ( Path ( PureWindowsPath ( path )), 'r' , encoding = "utf-8" ) as file_pts :
+ with open ( check_path ( path ), 'r' , encoding = "utf-8" ) as file_pts :
for pt in file_pts . readlines ():
if pt != ' \n ' and pt [ 0 ] != '#' :
info = pt . split ()
@@ -353,7 +354,7 @@ Source code for borea.reader.reader_point
ttype = []
coor = []
try :
- with open ( Path ( PureWindowsPath ( path )), 'r' , encoding = "utf-8" ) as file_pts :
+ with open ( check_path ( path ), 'r' , encoding = "utf-8" ) as file_pts :
for pt in file_pts . readlines ():
if pt != ' \n ' and pt [ 0 ] != '#' :
info = pt . split ()
diff --git a/docs/sphinx/_build/html/_modules/borea/stat/statistics.html b/docs/sphinx/_build/html/_modules/borea/stat/statistics.html
index 419895ca..0179033b 100644
--- a/docs/sphinx/_build/html/_modules/borea/stat/statistics.html
+++ b/docs/sphinx/_build/html/_modules/borea/stat/statistics.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -277,8 +278,8 @@
Source code for borea.stat.statistics
"""
import os
import io
-from pathlib import Path , PureWindowsPath
import numpy as np
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
@@ -298,7 +299,7 @@ Source code for borea.stat.statistics
type_point (list): List of type point on which we make the stats.
"""
self . work = work
- self . pathoutput = Path ( PureWindowsPath ( pathoutput ))
+ self . pathoutput = check_path ( pathoutput )
if type_point is None :
self . type_point = []
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_dtm/world_image_dtm.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_dtm/world_image_dtm.html
index 351684a8..f901a1a8 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_dtm/world_image_dtm.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_dtm/world_image_dtm.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/conversion_coor_shot.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/conversion_coor_shot.html
index 119544a8..e8a03642 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/conversion_coor_shot.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/conversion_coor_shot.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/image_world_shot.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/image_world_shot.html
index b2355b2c..fb57bfa7 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/image_world_shot.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/image_world_shot.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/world_image_shot.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/world_image_shot.html
index 8cacca3d..b7cb6138 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/world_image_shot.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_shot/world_image_shot.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_intersection.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_intersection.html
index d32f44ed..4780bd81 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_intersection.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_intersection.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_least_square.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_least_square.html
index e8937bd8..1426e267 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_least_square.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_least_square.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_work.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_work.html
index 13d2ded9..ba619a83 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_work.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/image_world_work.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/space_resection.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/space_resection.html
index 0575cb3b..2704dd91 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/space_resection.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/space_resection.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/world_image_work.html b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/world_image_work.html
index 70aefee3..b06e11ab 100644
--- a/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/world_image_work.html
+++ b/docs/sphinx/_build/html/_modules/borea/transform_world_image/transform_worksite/world_image_work.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_opk.html b/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_opk.html
index 354358f1..219ff8a7 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_opk.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_opk.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_reader_pt.html b/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_reader_pt.html
index f98380ea..4f4aa477 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_reader_pt.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/check/check_args_reader_pt.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/check/check_array.html b/docs/sphinx/_build/html/_modules/borea/utils/check/check_array.html
index 8d3bf21c..01682b5d 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/check/check_array.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/check/check_array.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/check/check_header.html b/docs/sphinx/_build/html/_modules/borea/utils/check/check_header.html
index 25ddac95..15ce23d8 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/check/check_header.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/check/check_header.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/check/check_order_axe.html b/docs/sphinx/_build/html/_modules/borea/utils/check/check_order_axe.html
index 8cb94bb1..08124bba 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/check/check_order_axe.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/check/check_order_axe.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/check/check_path.html b/docs/sphinx/_build/html/_modules/borea/utils/check/check_path.html
new file mode 100644
index 00000000..a5e9c7a7
--- /dev/null
+++ b/docs/sphinx/_build/html/_modules/borea/utils/check/check_path.html
@@ -0,0 +1,341 @@
+
+
+
+
+
+
+
+
borea.utils.check.check_path - Borea 0.2.1 documentation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Contents
+
+
+
+
+
+
+ Expand
+
+
+
+
+
+ Light mode
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Dark mode
+
+
+
+
+
+
+ Auto light/dark, in light mode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Auto light/dark, in dark mode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Hide table of contents sidebar
+
+
+
Skip to content
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Back to top
+
+
+
+
+ Toggle Light / Dark / Auto color theme
+
+
+
+
+
+
+
+ Toggle table of contents sidebar
+
+
+
+
+ Source code for borea.utils.check.check_path
+"""
+Script to check path of data.
+"""
+from pathlib import Path , PureWindowsPath , PurePosixPath
+
+
+
[docs]
+
def check_path ( file : str ) -> Path :
+
"""
+
Check path of data if Posix of Windows path.
+
+
Args:
+
file (str): The path of data.
+
+
Returns:
+
Path: The good path.
+
"""
+
file = Path ( file )
+
name = file . stem
+
+
if "/" in name :
+
return Path ( PurePosixPath ( file ))
+
+
if " \\ " in name :
+
return Path ( PureWindowsPath ( file ))
+
+
return file
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Copyright © 2023, Antoine Cornu et Nicolas Laurain
+
+ Made with
Sphinx and
@pradyunsg 's
+
+
Furo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/miscellaneous.html b/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/miscellaneous.html
index ba3b49d5..27736891 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/miscellaneous.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/miscellaneous.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/param_bundle.html b/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/param_bundle.html
index b1f6b70e..dbe4e1b7 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/param_bundle.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/param_bundle.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/sparse.html b/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/sparse.html
index 4601240c..e7de2b9c 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/sparse.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/miscellaneous/sparse.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/singleton/singleton.html b/docs/sphinx/_build/html/_modules/borea/utils/singleton/singleton.html
index 2cc5f0b4..3bd008b8 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/singleton/singleton.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/singleton/singleton.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/solver/solver.html b/docs/sphinx/_build/html/_modules/borea/utils/solver/solver.html
index 22b0bee6..deaf807b 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/solver/solver.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/solver/solver.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -280,18 +281,18 @@
Source code for borea.utils.solver.solver
[docs]
-
def npsolve ( matA : np . ndarray , matB : np . ndarray ) -> np . ndarray :
+
def npsolve ( mat_a : np . ndarray , mat_b : np . ndarray ) -> np . ndarray :
"""
Solver used by Borea to resolve Ax = B
Args:
-
matA (np.ndarray): Matrix A
-
matB (np.ndarray): Matrix B
+
mat_a (np.ndarray): Matrix A
+
mat_b (np.ndarray): Matrix B
Returns:
np.ndarray: the result x
"""
-
return np . linalg . lstsq ( matA , matB , rcond = None )[ 0 ]
+ return np . linalg . lstsq ( mat_a , mat_b , rcond = None )[ 0 ]
diff --git a/docs/sphinx/_build/html/_modules/borea/utils/xml/xml.html b/docs/sphinx/_build/html/_modules/borea/utils/xml/xml.html
index 25e04199..d2123d0c 100644
--- a/docs/sphinx/_build/html/_modules/borea/utils/xml/xml.html
+++ b/docs/sphinx/_build/html/_modules/borea/utils/xml/xml.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/worksite/worksite.html b/docs/sphinx/_build/html/_modules/borea/worksite/worksite.html
index a9dba844..a80db556 100644
--- a/docs/sphinx/_build/html/_modules/borea/worksite/worksite.html
+++ b/docs/sphinx/_build/html/_modules/borea/worksite/worksite.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/writer/manage_writer.html b/docs/sphinx/_build/html/_modules/borea/writer/manage_writer.html
index 09f233b1..88569c6b 100644
--- a/docs/sphinx/_build/html/_modules/borea/writer/manage_writer.html
+++ b/docs/sphinx/_build/html/_modules/borea/writer/manage_writer.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
diff --git a/docs/sphinx/_build/html/_modules/borea/writer/writer_con.html b/docs/sphinx/_build/html/_modules/borea/writer/writer_con.html
index 4cd53b81..463d88bb 100644
--- a/docs/sphinx/_build/html/_modules/borea/writer/writer_con.html
+++ b/docs/sphinx/_build/html/_modules/borea/writer/writer_con.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -276,7 +277,7 @@
Source code for borea.writer.writer_con
Photogrammetry worksite to writing in rpc.
"""
import os
-from pathlib import Path , PureWindowsPath
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.geodesy.proj_engine import ProjEngine
from borea.format.conl import Conl
@@ -307,7 +308,7 @@ Source code for borea.writer.writer_con
for name_shot , shot in work . shots . items ():
cam = work . cameras [ shot . name_cam ]
- path_conical = os . path . join ( Path ( PureWindowsPath ( folder_con )), f " { name_shot } .CON" )
+ path_conical = os . path . join ( check_path ( folder_con ), f " { name_shot } .CON" )
Conl ( shot , cam , geoview_proj ) . save_conl ( path_conical )
diff --git a/docs/sphinx/_build/html/_modules/borea/writer/writer_df_to_txt.html b/docs/sphinx/_build/html/_modules/borea/writer/writer_df_to_txt.html
index e5ef6982..7dfd2da7 100644
--- a/docs/sphinx/_build/html/_modules/borea/writer/writer_df_to_txt.html
+++ b/docs/sphinx/_build/html/_modules/borea/writer/writer_df_to_txt.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -276,8 +277,8 @@
Source code for borea.writer.writer_df_to_txt Photogrammetry worksite to writing dataframe to txt.
"""
import os
-from pathlib import Path , PureWindowsPath
import pandas as pd
+from borea.utils.check.check_path import check_path
@@ -291,7 +292,7 @@
Source code for borea.writer.writer_df_to_txt pathreturn (str): Path to save the file.
df (pd.DataFrame): DataFrame to save.
"""
- path_txt = os . path . join ( Path ( PureWindowsPath ( pathreturn )), f " { name } .txt" )
+ path_txt = os . path . join ( check_path ( pathreturn ), f " { name } .txt" )
name_column = list ( df . columns )
diff --git a/docs/sphinx/_build/html/_modules/borea/writer/writer_opk.html b/docs/sphinx/_build/html/_modules/borea/writer/writer_opk.html
index dd33a4dc..68cb49e4 100644
--- a/docs/sphinx/_build/html/_modules/borea/writer/writer_opk.html
+++ b/docs/sphinx/_build/html/_modules/borea/writer/writer_opk.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+borea.utils.solver package
borea.utils.xml package
@@ -276,8 +277,8 @@ Source code for borea.writer.writer_opk
Photogrammetry worksite to writing in opk.
"""
import os
-from pathlib import Path , PureWindowsPath
import numpy as np
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.utils.check.check_args_opk import check_header_file
@@ -300,7 +301,7 @@ Source code for borea.writer.writer_opk
linear alteration.
work (Worksite): The site to be recorded.
"""
- path_opk = os . path . join ( Path ( PureWindowsPath ( path_opk )), f " { name_opk } .opk" )
+ path_opk = os . path . join ( check_path ( path_opk ), f " { name_opk } .opk" )
if args [ "header" ]:
header , type_z = check_header_file ( args [ "header" ])
diff --git a/docs/sphinx/_build/html/_modules/borea/writer/writer_rpc.html b/docs/sphinx/_build/html/_modules/borea/writer/writer_rpc.html
index b36cfc7b..834f5373 100644
--- a/docs/sphinx/_build/html/_modules/borea/writer/writer_rpc.html
+++ b/docs/sphinx/_build/html/_modules/borea/writer/writer_rpc.html
@@ -228,6 +228,7 @@
borea.utils.check package
borea.utils.miscellaneous package
borea.utils.singleton package
+
borea.utils.solver package
borea.utils.xml package
@@ -276,8 +277,8 @@
Source code for borea.writer.writer_rpc
Photogrammetry worksite to writing in rpc.
"""
import os
-from pathlib import Path , PureWindowsPath
from borea.format.rpc import Rpc
+from borea.utils.check.check_path import check_path
from borea.worksite.worksite import Worksite
from borea.datastruct.dtm import Dtm
@@ -329,9 +330,9 @@ Source code for borea.writer.writer_rpc
for idx , val in enumerate ( rpc . param_rpc [ "SAMP_DEN_COEFF" ]):
list_txt_rpc += [ f "SAMP_DEN_COEFF_ { idx + 1 } : { val } " ]
- path_rpc = os . path . join ( Path ( PureWindowsPath ( folder_rpc )),
+ path_rpc = os . path . join ( check_path ( folder_rpc ),
f " { name_shot } _RPC.TXT" )
- Path ( path_rpc ) . write_text ( " \n " . join ( list_txt_rpc ), encoding = "UTF-8" )
+ check_path ( path_rpc ) . write_text ( " \n " . join ( list_txt_rpc ), encoding = "UTF-8" )
diff --git a/docs/sphinx/_build/html/_modules/index.html b/docs/sphinx/_build/html/_modules/index.html
index 8b7e7165..7592294b 100644
--- a/docs/sphinx/_build/html/_modules/index.html
+++ b/docs/sphinx/_build/html/_modules/index.html
@@ -323,6 +323,7 @@ All modules for which code is available
borea.utils.check.check_array
borea.utils.check.check_header
borea.utils.check.check_order_axe
+
borea.utils.check.check_path
borea.utils.miscellaneous.miscellaneous
borea.utils.miscellaneous.param_bundle
borea.utils.miscellaneous.sparse
diff --git a/docs/sphinx/_build/html/_sources/borea.utils.check.rst.txt b/docs/sphinx/_build/html/_sources/borea.utils.check.rst.txt
index 88299e4a..c95b9e51 100644
--- a/docs/sphinx/_build/html/_sources/borea.utils.check.rst.txt
+++ b/docs/sphinx/_build/html/_sources/borea.utils.check.rst.txt
@@ -44,6 +44,14 @@ borea.utils.check.check\_order\_axe module
:undoc-members:
:show-inheritance:
+borea.utils.check.check\_path module
+------------------------------------
+
+.. automodule:: borea.utils.check.check_path
+ :members:
+ :undoc-members:
+ :show-inheritance:
+
Module contents
---------------
diff --git a/docs/sphinx/_build/html/borea.html b/docs/sphinx/_build/html/borea.html
index 43618c8b..40ddf3b8 100644
--- a/docs/sphinx/_build/html/borea.html
+++ b/docs/sphinx/_build/html/borea.html
@@ -578,6 +578,7 @@
borea.utils.check.check_header module
borea.utils.check.check_order_axe module
+
borea.utils.check.check_path module
Module contents
diff --git a/docs/sphinx/_build/html/borea.utils.check.html b/docs/sphinx/_build/html/borea.utils.check.html
index 1b9d9597..df54df92 100644
--- a/docs/sphinx/_build/html/borea.utils.check.html
+++ b/docs/sphinx/_build/html/borea.utils.check.html
@@ -475,6 +475,27 @@
Submodules