ign-borea 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. ign_borea-0.1.5/LICENSE +21 -0
  2. ign_borea-0.1.5/PKG-INFO +274 -0
  3. ign_borea-0.1.5/README.md +68 -0
  4. ign_borea-0.1.5/README_borea_lib.md +216 -0
  5. ign_borea-0.1.5/borea/__init__.py +0 -0
  6. ign_borea-0.1.5/borea/datastruct/__init__.py +0 -0
  7. ign_borea-0.1.5/borea/datastruct/camera.py +25 -0
  8. ign_borea-0.1.5/borea/datastruct/dtm.py +119 -0
  9. ign_borea-0.1.5/borea/datastruct/gcp.py +22 -0
  10. ign_borea-0.1.5/borea/datastruct/shot.py +222 -0
  11. ign_borea-0.1.5/borea/datastruct/workdata.py +220 -0
  12. ign_borea-0.1.5/borea/format/__init__.py +0 -0
  13. ign_borea-0.1.5/borea/format/conl.py +143 -0
  14. ign_borea-0.1.5/borea/format/rpc.py +244 -0
  15. ign_borea-0.1.5/borea/geodesy/__init__.py +0 -0
  16. ign_borea-0.1.5/borea/geodesy/approx_euclidean_proj.py +91 -0
  17. ign_borea-0.1.5/borea/geodesy/euclidean_proj.py +25 -0
  18. ign_borea-0.1.5/borea/geodesy/local_euclidean_proj.py +127 -0
  19. ign_borea-0.1.5/borea/geodesy/proj_engine.py +70 -0
  20. ign_borea-0.1.5/borea/geodesy/projectionlist/__init__.py +0 -0
  21. ign_borea-0.1.5/borea/geodesy/projectionlist/search_proj.py +60 -0
  22. ign_borea-0.1.5/borea/geodesy/transform_geodesy.py +114 -0
  23. ign_borea-0.1.5/borea/process/__init__.py +0 -0
  24. ign_borea-0.1.5/borea/process/p_add_data/__init__.py +0 -0
  25. ign_borea-0.1.5/borea/process/p_add_data/p_add_shot.py +63 -0
  26. ign_borea-0.1.5/borea/process/p_add_data/p_file_gcp2d.py +55 -0
  27. ign_borea-0.1.5/borea/process/p_add_data/p_file_gcp3d.py +53 -0
  28. ign_borea-0.1.5/borea/process/p_add_data/p_gen_param.py +76 -0
  29. ign_borea-0.1.5/borea/process/p_add_data/p_pt2d.py +48 -0
  30. ign_borea-0.1.5/borea/process/p_add_data/p_pt3d.py +48 -0
  31. ign_borea-0.1.5/borea/process/p_add_data/p_unit_shot.py +48 -0
  32. ign_borea-0.1.5/borea/process/p_add_data/p_write.py +23 -0
  33. ign_borea-0.1.5/borea/process/p_format/__init__.py +0 -0
  34. ign_borea-0.1.5/borea/process/p_format/p_read_opk.py +78 -0
  35. ign_borea-0.1.5/borea/process/p_format/p_write_con.py +36 -0
  36. ign_borea-0.1.5/borea/process/p_format/p_write_opk.py +64 -0
  37. ign_borea-0.1.5/borea/process/p_format/p_write_rpc.py +48 -0
  38. ign_borea-0.1.5/borea/process/p_func/__init__.py +0 -0
  39. ign_borea-0.1.5/borea/process/p_func/p_control.py +67 -0
  40. ign_borea-0.1.5/borea/process/p_func/p_image_world.py +48 -0
  41. ign_borea-0.1.5/borea/process/p_func/p_spaceresection.py +51 -0
  42. ign_borea-0.1.5/borea/process/p_func/p_world_image.py +49 -0
  43. ign_borea-0.1.5/borea/reader/__init__.py +0 -0
  44. ign_borea-0.1.5/borea/reader/orientation/__init__.py +0 -0
  45. ign_borea-0.1.5/borea/reader/orientation/manage_reader.py +33 -0
  46. ign_borea-0.1.5/borea/reader/orientation/reader_opk.py +58 -0
  47. ign_borea-0.1.5/borea/reader/reader_camera.py +52 -0
  48. ign_borea-0.1.5/borea/reader/reader_point.py +113 -0
  49. ign_borea-0.1.5/borea/stat/__init__.py +0 -0
  50. ign_borea-0.1.5/borea/stat/statistics.py +215 -0
  51. ign_borea-0.1.5/borea/transform_world_image/__init__.py +0 -0
  52. ign_borea-0.1.5/borea/transform_world_image/transform_dtm/__init__.py +0 -0
  53. ign_borea-0.1.5/borea/transform_world_image/transform_dtm/world_image_dtm.py +47 -0
  54. ign_borea-0.1.5/borea/transform_world_image/transform_shot/__init__.py +0 -0
  55. ign_borea-0.1.5/borea/transform_world_image/transform_shot/conversion_coor_shot.py +58 -0
  56. ign_borea-0.1.5/borea/transform_world_image/transform_shot/image_world_shot.py +153 -0
  57. ign_borea-0.1.5/borea/transform_world_image/transform_shot/world_image_shot.py +117 -0
  58. ign_borea-0.1.5/borea/transform_world_image/transform_worksite/__init__.py +0 -0
  59. ign_borea-0.1.5/borea/transform_world_image/transform_worksite/image_world_intersection.py +154 -0
  60. ign_borea-0.1.5/borea/transform_world_image/transform_worksite/image_world_least_square.py +184 -0
  61. ign_borea-0.1.5/borea/transform_world_image/transform_worksite/image_world_work.py +49 -0
  62. ign_borea-0.1.5/borea/transform_world_image/transform_worksite/space_resection.py +343 -0
  63. ign_borea-0.1.5/borea/transform_world_image/transform_worksite/world_image_work.py +43 -0
  64. ign_borea-0.1.5/borea/utils/__init__.py +0 -0
  65. ign_borea-0.1.5/borea/utils/check/__init__.py +0 -0
  66. ign_borea-0.1.5/borea/utils/check/check_args_opk.py +59 -0
  67. ign_borea-0.1.5/borea/utils/check/check_args_reader_pt.py +44 -0
  68. ign_borea-0.1.5/borea/utils/check/check_array.py +56 -0
  69. ign_borea-0.1.5/borea/utils/check/check_header.py +90 -0
  70. ign_borea-0.1.5/borea/utils/check/check_order_axe.py +50 -0
  71. ign_borea-0.1.5/borea/utils/miscellaneous/__init__.py +0 -0
  72. ign_borea-0.1.5/borea/utils/miscellaneous/miscellaneous.py +83 -0
  73. ign_borea-0.1.5/borea/utils/miscellaneous/param_bundle.py +36 -0
  74. ign_borea-0.1.5/borea/utils/miscellaneous/sparse.py +31 -0
  75. ign_borea-0.1.5/borea/utils/singleton/__init__.py +0 -0
  76. ign_borea-0.1.5/borea/utils/singleton/singleton.py +23 -0
  77. ign_borea-0.1.5/borea/utils/xml/__init__.py +0 -0
  78. ign_borea-0.1.5/borea/utils/xml/xml.py +63 -0
  79. ign_borea-0.1.5/borea/worksite/__init__.py +0 -0
  80. ign_borea-0.1.5/borea/worksite/worksite.py +240 -0
  81. ign_borea-0.1.5/borea/writer/__init__.py +0 -0
  82. ign_borea-0.1.5/borea/writer/manage_writer.py +23 -0
  83. ign_borea-0.1.5/borea/writer/writer_con.py +29 -0
  84. ign_borea-0.1.5/borea/writer/writer_df_to_txt.py +32 -0
  85. ign_borea-0.1.5/borea/writer/writer_opk.py +70 -0
  86. ign_borea-0.1.5/borea/writer/writer_rpc.py +55 -0
  87. ign_borea-0.1.5/borea_dependency/requirements-dev.txt +13 -0
  88. ign_borea-0.1.5/borea_dependency/requirements.txt +5 -0
  89. ign_borea-0.1.5/borea_tools/__init__.py +0 -0
  90. ign_borea-0.1.5/borea_tools/opk_control.py +33 -0
  91. ign_borea-0.1.5/borea_tools/opk_to_conl.py +33 -0
  92. ign_borea-0.1.5/borea_tools/opk_to_opk.py +33 -0
  93. ign_borea-0.1.5/borea_tools/opk_to_rpc.py +33 -0
  94. ign_borea-0.1.5/borea_tools/pt_image_to_world.py +32 -0
  95. ign_borea-0.1.5/borea_tools/pt_world_to_image.py +32 -0
  96. ign_borea-0.1.5/borea_tools/ptfile_image_to_world.py +32 -0
  97. ign_borea-0.1.5/borea_tools/ptfile_world_to_image.py +32 -0
  98. ign_borea-0.1.5/borea_tools/spaceresection_opk.py +34 -0
  99. ign_borea-0.1.5/ign_borea.egg-info/PKG-INFO +274 -0
  100. ign_borea-0.1.5/ign_borea.egg-info/SOURCES.txt +104 -0
  101. ign_borea-0.1.5/ign_borea.egg-info/dependency_links.txt +1 -0
  102. ign_borea-0.1.5/ign_borea.egg-info/entry_points.txt +10 -0
  103. ign_borea-0.1.5/ign_borea.egg-info/requires.txt +20 -0
  104. ign_borea-0.1.5/ign_borea.egg-info/top_level.txt +2 -0
  105. ign_borea-0.1.5/pyproject.toml +50 -0
  106. ign_borea-0.1.5/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Institut National de l'Information Géographique et Forestière
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,274 @@
1
+ Metadata-Version: 2.1
2
+ Name: ign-borea
3
+ Version: 0.1.5
4
+ Summary: A package to manipulate orientation files
5
+ Author-email: Antoine Cornu <antoine.cornu@ign.fr>, Nicolas Laurain <nicolas.laurain@ign.fr>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2024 Institut National de l'Information Géographique et Forestière
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Github, https://github.com/ACornuIGN/Pink_Lady
29
+ Keywords: ign-borea,borea,aero,ign
30
+ Classifier: License :: OSI Approved :: MIT License
31
+ Classifier: Programming Language :: Python :: 3.9
32
+ Classifier: Programming Language :: Python :: 3.10
33
+ Classifier: Operating System :: Microsoft :: Windows
34
+ Classifier: Operating System :: Unix
35
+ Classifier: Operating System :: MacOS
36
+ Requires-Python: >=3.9
37
+ Description-Content-Type: text/markdown
38
+ License-File: LICENSE
39
+ Requires-Dist: numpy<=1.26.4
40
+ Requires-Dist: dataclasses
41
+ Requires-Dist: pyproj
42
+ Requires-Dist: scipy
43
+ Requires-Dist: pandas
44
+ Provides-Extra: dev
45
+ Requires-Dist: numpy<=1.26.4; extra == "dev"
46
+ Requires-Dist: pylint; extra == "dev"
47
+ Requires-Dist: pytest; extra == "dev"
48
+ Requires-Dist: pytest-shutil; extra == "dev"
49
+ Requires-Dist: flake8; extra == "dev"
50
+ Requires-Dist: sphinx; extra == "dev"
51
+ Requires-Dist: furo; extra == "dev"
52
+ Requires-Dist: dataclasses; extra == "dev"
53
+ Requires-Dist: pyproj; extra == "dev"
54
+ Requires-Dist: scipy; extra == "dev"
55
+ Requires-Dist: pandas; extra == "dev"
56
+ Requires-Dist: build; extra == "dev"
57
+ Requires-Dist: twine; extra == "dev"
58
+
59
+ [![IGNF badge](https://img.shields.io/badge/IGNF-8cbd3a)](https://www.ign.fr/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ign-borea.svg?label=PyPI%20downloads)](
60
+ https://pypi.org/project/ign-borea/)
61
+
62
+ Borea is an open-source python package tools-box photogrammetric conversion format and transformation coordinate of image and terrain.
63
+ Why Borea? **B** for Box and **orea** is a back slang of aero.
64
+
65
+ ## Installation
66
+
67
+ #### Pip
68
+
69
+ Due to different dependency used installation of the library require `GDAL>=3.3.2`, which is not included in the dependency.
70
+ ```
71
+ pip install ign-borea
72
+ ```
73
+ For GDAL installation you need `libgdal-dev`:
74
+ ```
75
+ sudo apt-get install libgdal-dev
76
+ ```
77
+ Please note that the `GDAL` version depends on the `libgdal-dev` version.
78
+ ```
79
+ apt-cache show libgdal-dev
80
+ # or if you are ogr
81
+ ogrinfo --version
82
+ ```
83
+ ```
84
+ pip install GDAL==<GDAL VERSION FROM OGRINFO>
85
+ ```
86
+ You can find more information on [mothergeo-py](https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html) if you have problems installing GDAL.
87
+
88
+ #### In the QGIS environment
89
+
90
+ View the doc on [borea github docs/installation/In_QGIS.md](https://github.com/IGNF/Borea/tree/main/docs/installation/In_QGIS.md).
91
+
92
+ ## Tools
93
+
94
+ Some tools are already implemented in the library:
95
+ * Conversion OPK to OPK: `opk-to-opk -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_to_opk.md) (OPK = Omega Phi Kappa)
96
+ * Control OPK file: `opk-control -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_control.md)
97
+ * Conversion OPK to RPC: `opk-to-rpc -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_to_rpc.md)
98
+ * Conversion OPK to Conl: `opk-to-conl -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_to_conl.md) (Conl = light conical file, IGN France format)
99
+ * Transforms coordinates terrain from image: `pt-image-to-world -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_pt_image_to_world.md)
100
+ * Transforms coordinates image from terrain: `pt-world-to-image -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_pt_world_to_image.md)
101
+ * Transforms coordinates file terrain from image: `ptfile-image-to-world -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_ptfile_image_to_world.md)
102
+ * Transforms coordinates file image from terrain: `ptfile-world-to-image -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_ptfile_world_to_image.md)
103
+ * Calculates opk by space resection: `spaceresection-opk -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_spaceresection_opk.md)
104
+
105
+ ## Read data and instantiate worksite
106
+
107
+ Creation of a worksite object from a worksite file (.opk) to be read by `reader_orientation(pathfile, arg_dict)` with `from borea.reader.orientation.manage_reader import reader_orientation`.
108
+ `arg_dict` is a dictionary for different args:
109
+ * `"interval":[first_line, last_line]` is an list of int that specifies the number of lines you want to read. `first_line` allows you to skip the file header, which must not be taken into account when reading the file, as specified in the `header` variable. If `first_line = None` skips everything up to `last_line`, if `lastline = None` skips everything from `first_line` to the end, and if both are None reads the entire file.
110
+ * `"header":header` described in the section above, is a list of str e.g. `['N', 'X', 'Y', 'Z', 'O', 'P', 'K', 'C'] = list("NXYZOPKC")`, detail of letter at section [header of file opk](#header-of-file-opk) below.
111
+ * `"unit_angle": "degree"` degree or radian.
112
+ * `"linear_alteration": True` boolean saying True if z shots are corrected by linear alteration.
113
+ * `"order_axe: "opk"` string to define the order of angle to calculate rotation matrix.
114
+
115
+ Once the object has been created, you can add other data to it:
116
+
117
+ * Setup the projection of the worksite `work.set_proj(epsg, path_geoid)`, with:
118
+ * `epsg` the code epsg e.g. 2154
119
+ * `path_geoid` path to the file pyproj GeoTIFF of geoid
120
+
121
+ * The camera with `read_camera([filepath], worksite)` in `from borea.reader.reader_camera import read_camera`, this function only reads txt and xml files referencing camera data, and can take several camera files if there are several.
122
+
123
+ * Link points with `read_file_pt(filepath, header, type_point, worksite)` in `from borea.reader.reader_point import read_file_pt`. this function reads all .txt, .mes, .app and other file types, as long as the data structure in the file is column-based and delimited by spaces. The first args is the file path of one file. The second is the column type in the file detail of letter at section [header of point file](#header-of-point-file) below. The third is the type of point **'co_points'** for connecting points, **'gcp2d'** for coordinnate of gcp in images and **'gcp3d'** for gcp coordinate in the ground. And the last args is the worksite where data will be save.
124
+
125
+ * Add Dtm to your worksite `work.set_dtm(path_dtm, type_dtm)`, It converts z data between gcp and acquisition position if these are not in the same unit (one in altitude and one in height). `type_dtm` is the unit of the dtm 'altitude' or 'height'.
126
+
127
+ Examples in section [examples](#examples) below.
128
+
129
+ ## Different process
130
+
131
+ * Set different parameters for shots (projection system of shot and z_nadir), mandatory if data is to be processed afterwards. `work.set_param_shot()`.
132
+
133
+ * Can calculate the position of image points in world with `ImageWorldWork(worksite).manage_image_world(type_point, type_process, type_control)` in `from borea.transform_world_image.transform_worksite.image_world_work import ImageWorldWork`.
134
+ * `type_point` is the type of point you want to calcule `co_points` or `gcp2d`.
135
+ * `type_process` is the type of process you want to use intersection with key `inter` or least square methode with key `square`.
136
+ * `type_control` egal None by default, is used if the type_point = gcp2d and if you want just one type code point, else None to process on all point.
137
+
138
+ The result can be found in `worksite.co_pts_world['name_point']` when type_point = co_points or `worksite.img_pts_world['name_point]` when type_point = gcp2d.
139
+
140
+ * Can calculate the position of terrain points in images with `WorldImageWork(work).calculate_world_to_image(type_control)` in `from borea.transform_world_image.transform_worksite.world_image_work import WorldImageWork`, with `type_control` egal None by default, is used if the type_point = gcp2d and if you want just one type code point, else None to process on all point. . The result can be found in `worksite.shots['name_shot'].gcps['name_gcp']` for each image and each gcps.
141
+
142
+ * Can calculate spatial resection for each shot in worksite with `SpaceResection(work).space_resection_on_worksite(add_pixel = (0,0))` in `from borea.transform_world_image.transform_worksite.space_resection import SpaceResection`. `add_pixel` is used to add a mainiation to the position of the points to modify the shot's 6 external parameters for data conversion.
143
+
144
+ * Can calculate spatial resection in poitn of shot for creating worksite with `SpaceResection(work).space_resection_to_worksite(pt2d, pt3d, pinit)` in `from borea.transform_world_image.transform_worksite.space_resection import SpaceResection`.
145
+ The DataFrame **pt2d** is a table with 4 column and n line. The id of column must be:
146
+ * `id_pt`: the id of the point
147
+ * `id_shot`: the name of the shot where the point is located
148
+ * `column`: column coordinate in pixel of the point in the image
149
+ * `line`: line coordinate in pixel of the point in the image
150
+
151
+ it can be created with the function `read_file_pt_dataframe(path_file_pt,header_file,"pt2d")`
152
+ The DataFrame **pt3d** is a table with 5 column and n line. The id of column must be:
153
+ * `id_pt`: the id of the point
154
+ * `type`: if point is gcp with type else None
155
+ * `x`: x coordinate in your projection system of the point
156
+ * `y`: y coordinate in your projection system of the point
157
+ * `z`: z coordinate in your projection system of the point
158
+
159
+ it can be created with the function `read_file_pt_dataframe(path_file_pt,header_file,"pt3d")`
160
+ The dictionary **pinit** which give the initialization point X, Y, Z. A point on the worksite with a z at an approximate flying height. The name of the key in the dictionary is `coor_init`.
161
+ Example at the end of explanation of function [file](https://github.com/IGNF/Borea/tree/main/docs/functions/Space_resection.md).
162
+
163
+ * You can calculate some control point statistics to see how accurate your site is `stat = Stat(work, pathreturn, control_type)` to init the object and run for all stat with `stat.main_stat_and_save()`. Make stat on function image to world and world to image, if there are data. And save result on *pathreturn/Stat_{Name_worksite}.txt*.
164
+
165
+ Examples in section [examples](#examples) below.
166
+
167
+ ## Write data
168
+
169
+ * Can write worksite object as different format OPK, RPC, Conical for GEOVIEW. The function is `manager_reader(writer, name, pathreturn, args, work)` in `from borea.writer.manage_writer import manager_writer`:
170
+ * `writer` (str), is the type of output `"opk"`, `"rpc"`, `"con"`.
171
+ * `name` (str), name of file to save, just to save in opk, for other format this args isn't read.
172
+ * `pathreturn` (str), path of folder where you want to save data.
173
+ * `args` (dict), Dictionary with different args for the format to save, detail at setion [args for writing file](#args-for-writing-file) below.
174
+ * `work` (Worksite), the worksite to save.
175
+
176
+ Examples in section [examples](#examples) below.
177
+
178
+ ## Examples
179
+
180
+ All examples are in [borea github ./examples/](https://github.com/IGNF/Borea/tree/main/examples):
181
+ * For build main class Worksite with file **eg_build_worksite_by_file.py** and with data **eg_build_worksite_by_data.py**.
182
+ * To make transformation image to world **eg_image_to_world.py**.
183
+ * To make transformation world to image **eg_world_to_image.py**.
184
+ * To make space resection on point to determine worksite **eg_space_resection.py**.
185
+ * To convert format opk to an other format opk rpc con **eg_opk_to_format.py**.
186
+
187
+ Examples of the different formats of file can be found in [borea github ./dataset/](https://github.com/IGNF/Borea/tree/main/dataset):
188
+ * An opk file **23FD1305_alt_test.OPK** with z unit is altitude.
189
+ * Cameras filesformat **Camera1.txt** and **Camera2.txt**.
190
+ * Geotiff of the French geoid for pyproj fr_ign_RAF20.tif** detail at section [info projection](#info-projection) below.
191
+ * Crops geotiff of the French DTM **MNT_France_25m_h_crop.tif** in height unit.
192
+ * Ground Control Point (GCP) in terrian **GCP_test.app** unit z in height.
193
+ * Ground Control Point (GCP) in image **terrain_test.mes**.
194
+ * Connecting points in image **liaisons_test.mes**.
195
+ * Image point to transform terrain coordinates to image coordinates to find out in which image the points are located **terrain_test0.mes**.
196
+
197
+ ## Detail
198
+
199
+ ### Header of file opk
200
+ `header` is used to describe the format of the opk file read. It provides information on what's in each column, and gives the data unit for Z and angles.
201
+ Type is:
202
+ | Symbol | Details |
203
+ | :----: | :------ |
204
+ | S | to ignore the column |
205
+ | N | name of shot |
206
+ | X | coordinate x of the shot position |
207
+ | Y | coordinate y of the shot position |
208
+ | Z | coordinate z altitude of the shot position |
209
+ | H | coordinate z height of the shot position |
210
+ | O | omega rotation angle |
211
+ | P | phi rotation angle |
212
+ | K | kappa rotation angle |
213
+ | C | name of the camera |
214
+
215
+ ### Header of point file
216
+
217
+ `header` is used to describe the format of the point file read. It provides information on what's in each column.
218
+ Type is:
219
+ | Symbol | Details |
220
+ | :----: | :------ |
221
+ | S | to ignore the column |
222
+ | P | name of the point |
223
+ | N | name of shot |
224
+ | T | type of point |
225
+ | X | coordinate x of the shot position |
226
+ | Y | coordinate y of the shot position |
227
+ | Z | coordinate z altitude of the shot position |
228
+
229
+ ### Camera file format
230
+
231
+ The camera file is a txt file, containing 6 pieces of information about the camera : its **name** (str), **ppax** (float), **ppay** (float), **focal** (float), image size: **width** (int) and **height** (int) in pixels.
232
+ **Ppax** and **ppay** are the main points of image deformation in x and y directions.
233
+ Each line of the file corresponds to a piece of information, starting with the **type = info**.
234
+ ```
235
+ name = UCE-M3-f120-s06
236
+ ppax = 13210.00
237
+ ppay = 8502.00
238
+ focal = 30975.00
239
+ width = 26460
240
+ height = 17004
241
+ ```
242
+ Only these 7 pieces of information will be read. You can add comments with a # in the first element of the line or other type = info, but they will not be read by the tool, unless the attribute has been added to the Camera class in *borea/datastruct/camera.py*.
243
+ An example file can be found in repository *./dataset/Camera1.txt*.
244
+ No camera-related distortion is taken into account (distortion-free camera).
245
+
246
+ ### Info projection
247
+
248
+ This library can transform and process 3D data with a z in altitude or height. This is done by the pyproj library, which needs the geoid at site level to change units.
249
+
250
+ The varaible in example for adding a geoid is path_geoid, a list which contains paths of geoids, where you can enter the paths to the various geoids. If the file is stored in pyproj's native folder (pyproj.datadir.get_data_dir(), *usr/share/proj* or *env_name_folder/lib/python3.10/site-packages/pyproj/proj_dir/share/proj*) the file name is sufficient pyproj will find it on its own.
251
+ Geoids file can be found on pyproj's github (https://github.com/OSGeo/PROJ-data).
252
+
253
+ ### Args for writing file
254
+
255
+ #### OPK
256
+
257
+ There are 4 keys in the dictionary:
258
+ * "order_axe" (str): **Order of rotation matrix axes**.
259
+ * "header" (list): **List of column type** file (same to read opk).
260
+ * "unit_angle" (str): Unit of angle **'degree' or 'radian'**.
261
+ * "linear_alteration" (bool): **True** if data corrected by linear alteration or else **False**.
262
+
263
+ #### RPC
264
+
265
+ There are 3 keys in the dictionary:
266
+ * "size_grid" (int): **size of the grip** to calcule rpc.
267
+ * "order" (int): order of the polynome of the rpc. **[1, 2, 3]**
268
+ * "fact_rpc" (float): rpc factor for world coordinate when not src, we recommend **None**.
269
+
270
+ #### CON
271
+
272
+ There is no need for an additional argument, you can set **None** to the argument.
273
+
274
+ ![logo ign](docs/image/logo_ign.png) ![logo fr](docs/image/Republique_Francaise_Logo.png)
@@ -0,0 +1,68 @@
1
+ # Welcome to Borea !!!
2
+ [![IGNF badge](https://img.shields.io/badge/IGNF-8cbd3a)](https://www.ign.fr/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ign-borea.svg?label=PyPI%20downloads)](
3
+ https://pypi.org/project/ign-borea/)
4
+
5
+ Borea is an open-source tools-box photogrammetric conversion format and transformation coordinate of image and terrain.
6
+ Why Borea? B for Box and orea is a back slang of aero.
7
+
8
+ ## Tools
9
+
10
+ * Conversion OPK to OPK: [borea_tools/docs_tools/README_opk_to_opk.md](./borea_tools/docs_tools/README_opk_to_opk.md) (OPK = Omega Phi Kappa)
11
+ * Control OPK file: [borea_tools/docs_tools/README_opk_control.md](./borea_tools/docs_tools/README_opk_control.md)
12
+ * Conversion OPK to RPC: [borea_tools/docs_tools/README_opk_to_rpc.md](./borea_tools/docs_tools/README_opk_to_rpc.md) (RPC = Rational Polynomial Coefficients)
13
+ * Conversion OPK to Conl: [borea_tools/docs_tools/README_opk_to_conl.md](./borea_tools/docs_tools/README_opk_to_conl.md) (Conl = light conical file, IGN France format)
14
+ * Transforms coordinates terrain from image: [borea_tools/docs_tools/README_pt_image_to_world.md](./borea_tools/docs_tools/README_pt_image_to_world.md)
15
+ * Transforms coordinates image from terrain: [borea_tools/docs_tools/README_pt_world_to_image.md](./borea_tools/docs_tools/README_pt_world_to_image.md)
16
+ * Transforms coordinates file terrain from image: [borea_tools/docs_tools/README_ptfile_image_to_world.md](./borea_tools/docs_tools/README_ptfile_image_to_world.md)
17
+ * Transforms coordinates file image from terrain: [borea_tools/docs_tools/README_ptfile_world_to_image.md](./borea_tools/docs_tools/README_ptfile_world_to_image.md)
18
+ * Calculates opk by space resection: [borea_tools/docs_tools/README_spaceresection_opk.md](./borea_tools/docs_tools/README_spaceresection_opk.md)
19
+ * Python lib: [README_borea_lib.md](./README_borea_lib.md)
20
+
21
+ ## Dependency
22
+
23
+ ### Conda/Mamba
24
+ For conda/mamba environment the depencency is [borea_dependency/environment.yml](./borea_dependency/environment.yml).
25
+
26
+ ### Pip venv
27
+ For pip environment (venv) the depencency is [borea_dependency/requirements.txt](./borea_dependency/requirements.txt)
28
+ and you need to install `libgdal-dev` and `GDAL>=3.3.2`.
29
+
30
+ ## Installation
31
+
32
+ You need to retrieve the repository with ```git clone``` and install the environment. By ```conda``` or ```mamba``` with ```environment.yml``` or ```pip``` with ```requirements.txt```.
33
+
34
+ #### Conda/Mamba
35
+ ```
36
+ conda env create -f ./borea_dependency/environment.yaml
37
+ ```
38
+ ```
39
+ mamba env create -f ./borea_dependency/environment.yaml
40
+ ```
41
+
42
+ #### Pip
43
+ The package exists on pip with `pip install ign-borea` without GDAL
44
+
45
+ ```
46
+ pip install -r ./borea_dependency/requirements.txt
47
+ sudo apt-get install libgdal-dev
48
+ ```
49
+ Please note that the `GDAL` version depends on the `libgdal-dev` version.
50
+ ```
51
+ apt-cache show libgdal-dev
52
+ # or if you are ogr
53
+ ogrinfo --version
54
+ ```
55
+ ```
56
+ pip install GDAL==<GDAL VERSION FROM OGRINFO>
57
+ ```
58
+ You can find more information on [mothergeo-py](https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html) if you have problems installing GDAL.
59
+
60
+ #### In the QGIS environment
61
+
62
+ View the doc at [./docs/installation/In_QGIS.md](docs/installation/In_QGIS.md).
63
+
64
+ ## Contributing
65
+
66
+ link: [CONTRIBUTING.md](./CONTRIBUTING.md)
67
+
68
+ ![logo ign](docs/image/logo_ign.png) ![logo fr](docs/image/Republique_Francaise_Logo.png)
@@ -0,0 +1,216 @@
1
+ [![IGNF badge](https://img.shields.io/badge/IGNF-8cbd3a)](https://www.ign.fr/) [![PyPI Downloads](https://img.shields.io/pypi/dm/ign-borea.svg?label=PyPI%20downloads)](
2
+ https://pypi.org/project/ign-borea/)
3
+
4
+ Borea is an open-source python package tools-box photogrammetric conversion format and transformation coordinate of image and terrain.
5
+ Why Borea? **B** for Box and **orea** is a back slang of aero.
6
+
7
+ ## Installation
8
+
9
+ #### Pip
10
+
11
+ Due to different dependency used installation of the library require `GDAL>=3.3.2`, which is not included in the dependency.
12
+ ```
13
+ pip install ign-borea
14
+ ```
15
+ For GDAL installation you need `libgdal-dev`:
16
+ ```
17
+ sudo apt-get install libgdal-dev
18
+ ```
19
+ Please note that the `GDAL` version depends on the `libgdal-dev` version.
20
+ ```
21
+ apt-cache show libgdal-dev
22
+ # or if you are ogr
23
+ ogrinfo --version
24
+ ```
25
+ ```
26
+ pip install GDAL==<GDAL VERSION FROM OGRINFO>
27
+ ```
28
+ You can find more information on [mothergeo-py](https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html) if you have problems installing GDAL.
29
+
30
+ #### In the QGIS environment
31
+
32
+ View the doc on [borea github docs/installation/In_QGIS.md](https://github.com/IGNF/Borea/tree/main/docs/installation/In_QGIS.md).
33
+
34
+ ## Tools
35
+
36
+ Some tools are already implemented in the library:
37
+ * Conversion OPK to OPK: `opk-to-opk -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_to_opk.md) (OPK = Omega Phi Kappa)
38
+ * Control OPK file: `opk-control -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_control.md)
39
+ * Conversion OPK to RPC: `opk-to-rpc -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_to_rpc.md)
40
+ * Conversion OPK to Conl: `opk-to-conl -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_opk_to_conl.md) (Conl = light conical file, IGN France format)
41
+ * Transforms coordinates terrain from image: `pt-image-to-world -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_pt_image_to_world.md)
42
+ * Transforms coordinates image from terrain: `pt-world-to-image -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_pt_world_to_image.md)
43
+ * Transforms coordinates file terrain from image: `ptfile-image-to-world -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_ptfile_image_to_world.md)
44
+ * Transforms coordinates file image from terrain: `ptfile-world-to-image -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_ptfile_world_to_image.md)
45
+ * Calculates opk by space resection: `spaceresection-opk -h` [doc](https://github.com/IGNF/Borea/tree/main/borea_tools/docs_tools/README_spaceresection_opk.md)
46
+
47
+ ## Read data and instantiate worksite
48
+
49
+ Creation of a worksite object from a worksite file (.opk) to be read by `reader_orientation(pathfile, arg_dict)` with `from borea.reader.orientation.manage_reader import reader_orientation`.
50
+ `arg_dict` is a dictionary for different args:
51
+ * `"interval":[first_line, last_line]` is an list of int that specifies the number of lines you want to read. `first_line` allows you to skip the file header, which must not be taken into account when reading the file, as specified in the `header` variable. If `first_line = None` skips everything up to `last_line`, if `lastline = None` skips everything from `first_line` to the end, and if both are None reads the entire file.
52
+ * `"header":header` described in the section above, is a list of str e.g. `['N', 'X', 'Y', 'Z', 'O', 'P', 'K', 'C'] = list("NXYZOPKC")`, detail of letter at section [header of file opk](#header-of-file-opk) below.
53
+ * `"unit_angle": "degree"` degree or radian.
54
+ * `"linear_alteration": True` boolean saying True if z shots are corrected by linear alteration.
55
+ * `"order_axe: "opk"` string to define the order of angle to calculate rotation matrix.
56
+
57
+ Once the object has been created, you can add other data to it:
58
+
59
+ * Setup the projection of the worksite `work.set_proj(epsg, path_geoid)`, with:
60
+ * `epsg` the code epsg e.g. 2154
61
+ * `path_geoid` path to the file pyproj GeoTIFF of geoid
62
+
63
+ * The camera with `read_camera([filepath], worksite)` in `from borea.reader.reader_camera import read_camera`, this function only reads txt and xml files referencing camera data, and can take several camera files if there are several.
64
+
65
+ * Link points with `read_file_pt(filepath, header, type_point, worksite)` in `from borea.reader.reader_point import read_file_pt`. this function reads all .txt, .mes, .app and other file types, as long as the data structure in the file is column-based and delimited by spaces. The first args is the file path of one file. The second is the column type in the file detail of letter at section [header of point file](#header-of-point-file) below. The third is the type of point **'co_points'** for connecting points, **'gcp2d'** for coordinnate of gcp in images and **'gcp3d'** for gcp coordinate in the ground. And the last args is the worksite where data will be save.
66
+
67
+ * Add Dtm to your worksite `work.set_dtm(path_dtm, type_dtm)`, It converts z data between gcp and acquisition position if these are not in the same unit (one in altitude and one in height). `type_dtm` is the unit of the dtm 'altitude' or 'height'.
68
+
69
+ Examples in section [examples](#examples) below.
70
+
71
+ ## Different process
72
+
73
+ * Set different parameters for shots (projection system of shot and z_nadir), mandatory if data is to be processed afterwards. `work.set_param_shot()`.
74
+
75
+ * Can calculate the position of image points in world with `ImageWorldWork(worksite).manage_image_world(type_point, type_process, type_control)` in `from borea.transform_world_image.transform_worksite.image_world_work import ImageWorldWork`.
76
+ * `type_point` is the type of point you want to calcule `co_points` or `gcp2d`.
77
+ * `type_process` is the type of process you want to use intersection with key `inter` or least square methode with key `square`.
78
+ * `type_control` egal None by default, is used if the type_point = gcp2d and if you want just one type code point, else None to process on all point.
79
+
80
+ The result can be found in `worksite.co_pts_world['name_point']` when type_point = co_points or `worksite.img_pts_world['name_point]` when type_point = gcp2d.
81
+
82
+ * Can calculate the position of terrain points in images with `WorldImageWork(work).calculate_world_to_image(type_control)` in `from borea.transform_world_image.transform_worksite.world_image_work import WorldImageWork`, with `type_control` egal None by default, is used if the type_point = gcp2d and if you want just one type code point, else None to process on all point. . The result can be found in `worksite.shots['name_shot'].gcps['name_gcp']` for each image and each gcps.
83
+
84
+ * Can calculate spatial resection for each shot in worksite with `SpaceResection(work).space_resection_on_worksite(add_pixel = (0,0))` in `from borea.transform_world_image.transform_worksite.space_resection import SpaceResection`. `add_pixel` is used to add a mainiation to the position of the points to modify the shot's 6 external parameters for data conversion.
85
+
86
+ * Can calculate spatial resection in poitn of shot for creating worksite with `SpaceResection(work).space_resection_to_worksite(pt2d, pt3d, pinit)` in `from borea.transform_world_image.transform_worksite.space_resection import SpaceResection`.
87
+ The DataFrame **pt2d** is a table with 4 column and n line. The id of column must be:
88
+ * `id_pt`: the id of the point
89
+ * `id_shot`: the name of the shot where the point is located
90
+ * `column`: column coordinate in pixel of the point in the image
91
+ * `line`: line coordinate in pixel of the point in the image
92
+
93
+ it can be created with the function `read_file_pt_dataframe(path_file_pt,header_file,"pt2d")`
94
+ The DataFrame **pt3d** is a table with 5 column and n line. The id of column must be:
95
+ * `id_pt`: the id of the point
96
+ * `type`: if point is gcp with type else None
97
+ * `x`: x coordinate in your projection system of the point
98
+ * `y`: y coordinate in your projection system of the point
99
+ * `z`: z coordinate in your projection system of the point
100
+
101
+ it can be created with the function `read_file_pt_dataframe(path_file_pt,header_file,"pt3d")`
102
+ The dictionary **pinit** which give the initialization point X, Y, Z. A point on the worksite with a z at an approximate flying height. The name of the key in the dictionary is `coor_init`.
103
+ Example at the end of explanation of function [file](https://github.com/IGNF/Borea/tree/main/docs/functions/Space_resection.md).
104
+
105
+ * You can calculate some control point statistics to see how accurate your site is `stat = Stat(work, pathreturn, control_type)` to init the object and run for all stat with `stat.main_stat_and_save()`. Make stat on function image to world and world to image, if there are data. And save result on *pathreturn/Stat_{Name_worksite}.txt*.
106
+
107
+ Examples in section [examples](#examples) below.
108
+
109
+ ## Write data
110
+
111
+ * Can write worksite object as different format OPK, RPC, Conical for GEOVIEW. The function is `manager_reader(writer, name, pathreturn, args, work)` in `from borea.writer.manage_writer import manager_writer`:
112
+ * `writer` (str), is the type of output `"opk"`, `"rpc"`, `"con"`.
113
+ * `name` (str), name of file to save, just to save in opk, for other format this args isn't read.
114
+ * `pathreturn` (str), path of folder where you want to save data.
115
+ * `args` (dict), Dictionary with different args for the format to save, detail at setion [args for writing file](#args-for-writing-file) below.
116
+ * `work` (Worksite), the worksite to save.
117
+
118
+ Examples in section [examples](#examples) below.
119
+
120
+ ## Examples
121
+
122
+ All examples are in [borea github ./examples/](https://github.com/IGNF/Borea/tree/main/examples):
123
+ * For build main class Worksite with file **eg_build_worksite_by_file.py** and with data **eg_build_worksite_by_data.py**.
124
+ * To make transformation image to world **eg_image_to_world.py**.
125
+ * To make transformation world to image **eg_world_to_image.py**.
126
+ * To make space resection on point to determine worksite **eg_space_resection.py**.
127
+ * To convert format opk to an other format opk rpc con **eg_opk_to_format.py**.
128
+
129
+ Examples of the different formats of file can be found in [borea github ./dataset/](https://github.com/IGNF/Borea/tree/main/dataset):
130
+ * An opk file **23FD1305_alt_test.OPK** with z unit is altitude.
131
+ * Cameras filesformat **Camera1.txt** and **Camera2.txt**.
132
+ * Geotiff of the French geoid for pyproj fr_ign_RAF20.tif** detail at section [info projection](#info-projection) below.
133
+ * Crops geotiff of the French DTM **MNT_France_25m_h_crop.tif** in height unit.
134
+ * Ground Control Point (GCP) in terrian **GCP_test.app** unit z in height.
135
+ * Ground Control Point (GCP) in image **terrain_test.mes**.
136
+ * Connecting points in image **liaisons_test.mes**.
137
+ * Image point to transform terrain coordinates to image coordinates to find out in which image the points are located **terrain_test0.mes**.
138
+
139
+ ## Detail
140
+
141
+ ### Header of file opk
142
+ `header` is used to describe the format of the opk file read. It provides information on what's in each column, and gives the data unit for Z and angles.
143
+ Type is:
144
+ | Symbol | Details |
145
+ | :----: | :------ |
146
+ | S | to ignore the column |
147
+ | N | name of shot |
148
+ | X | coordinate x of the shot position |
149
+ | Y | coordinate y of the shot position |
150
+ | Z | coordinate z altitude of the shot position |
151
+ | H | coordinate z height of the shot position |
152
+ | O | omega rotation angle |
153
+ | P | phi rotation angle |
154
+ | K | kappa rotation angle |
155
+ | C | name of the camera |
156
+
157
+ ### Header of point file
158
+
159
+ `header` is used to describe the format of the point file read. It provides information on what's in each column.
160
+ Type is:
161
+ | Symbol | Details |
162
+ | :----: | :------ |
163
+ | S | to ignore the column |
164
+ | P | name of the point |
165
+ | N | name of shot |
166
+ | T | type of point |
167
+ | X | coordinate x of the shot position |
168
+ | Y | coordinate y of the shot position |
169
+ | Z | coordinate z altitude of the shot position |
170
+
171
+ ### Camera file format
172
+
173
+ The camera file is a txt file, containing 6 pieces of information about the camera : its **name** (str), **ppax** (float), **ppay** (float), **focal** (float), image size: **width** (int) and **height** (int) in pixels.
174
+ **Ppax** and **ppay** are the main points of image deformation in x and y directions.
175
+ Each line of the file corresponds to a piece of information, starting with the **type = info**.
176
+ ```
177
+ name = UCE-M3-f120-s06
178
+ ppax = 13210.00
179
+ ppay = 8502.00
180
+ focal = 30975.00
181
+ width = 26460
182
+ height = 17004
183
+ ```
184
+ Only these 7 pieces of information will be read. You can add comments with a # in the first element of the line or other type = info, but they will not be read by the tool, unless the attribute has been added to the Camera class in *borea/datastruct/camera.py*.
185
+ An example file can be found in repository *./dataset/Camera1.txt*.
186
+ No camera-related distortion is taken into account (distortion-free camera).
187
+
188
+ ### Info projection
189
+
190
+ This library can transform and process 3D data with a z in altitude or height. This is done by the pyproj library, which needs the geoid at site level to change units.
191
+
192
+ The varaible in example for adding a geoid is path_geoid, a list which contains paths of geoids, where you can enter the paths to the various geoids. If the file is stored in pyproj's native folder (pyproj.datadir.get_data_dir(), *usr/share/proj* or *env_name_folder/lib/python3.10/site-packages/pyproj/proj_dir/share/proj*) the file name is sufficient pyproj will find it on its own.
193
+ Geoids file can be found on pyproj's github (https://github.com/OSGeo/PROJ-data).
194
+
195
+ ### Args for writing file
196
+
197
+ #### OPK
198
+
199
+ There are 4 keys in the dictionary:
200
+ * "order_axe" (str): **Order of rotation matrix axes**.
201
+ * "header" (list): **List of column type** file (same to read opk).
202
+ * "unit_angle" (str): Unit of angle **'degree' or 'radian'**.
203
+ * "linear_alteration" (bool): **True** if data corrected by linear alteration or else **False**.
204
+
205
+ #### RPC
206
+
207
+ There are 3 keys in the dictionary:
208
+ * "size_grid" (int): **size of the grip** to calcule rpc.
209
+ * "order" (int): order of the polynome of the rpc. **[1, 2, 3]**
210
+ * "fact_rpc" (float): rpc factor for world coordinate when not src, we recommend **None**.
211
+
212
+ #### CON
213
+
214
+ There is no need for an additional argument, you can set **None** to the argument.
215
+
216
+ ![logo ign](docs/image/logo_ign.png) ![logo fr](docs/image/Republique_Francaise_Logo.png)
File without changes
File without changes
@@ -0,0 +1,25 @@
1
+ """
2
+ Camera data class module.
3
+ """
4
+ from dataclasses import dataclass, field
5
+
6
+
7
+ @dataclass
8
+ class Camera:
9
+ """
10
+ Camera class definition.
11
+
12
+ Args:
13
+ name_camera (str): Name of the camera.
14
+ ppax (float): Center of distortion in x.
15
+ ppay (float): Center of distortion in y.
16
+ focal (float): Focal of the camera.
17
+ width (int): Width of the image in pixel.
18
+ height (int): Height of the image in pixel.
19
+ """
20
+ name_camera: str
21
+ ppax: float = field(default=None)
22
+ ppay: float = field(default=None)
23
+ focal: float = field(default=None)
24
+ width: int = field(default=None)
25
+ height: int = field(default=None)