weitsicht 0.0.1__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 (83) hide show
  1. weitsicht-0.0.1/LICENSE +177 -0
  2. weitsicht-0.0.1/PKG-INFO +489 -0
  3. weitsicht-0.0.1/pyproject.toml +119 -0
  4. weitsicht-0.0.1/readme.md +266 -0
  5. weitsicht-0.0.1/setup.cfg +4 -0
  6. weitsicht-0.0.1/src/weitsicht/__init__.py +206 -0
  7. weitsicht-0.0.1/src/weitsicht/camera/__init__.py +26 -0
  8. weitsicht-0.0.1/src/weitsicht/camera/base_perspective.py +453 -0
  9. weitsicht-0.0.1/src/weitsicht/camera/camera_dict_selector.py +49 -0
  10. weitsicht-0.0.1/src/weitsicht/camera/camera_types.py +45 -0
  11. weitsicht-0.0.1/src/weitsicht/camera/opencv_perspective.py +304 -0
  12. weitsicht-0.0.1/src/weitsicht/cfg.py +20 -0
  13. weitsicht-0.0.1/src/weitsicht/exceptions.py +55 -0
  14. weitsicht-0.0.1/src/weitsicht/geometry/__init__.py +39 -0
  15. weitsicht-0.0.1/src/weitsicht/geometry/coo_geojson.py +50 -0
  16. weitsicht-0.0.1/src/weitsicht/geometry/coplanar_collinear.py +60 -0
  17. weitsicht-0.0.1/src/weitsicht/geometry/interpolation_bilinear.py +60 -0
  18. weitsicht-0.0.1/src/weitsicht/geometry/intersection_bilinear.py +101 -0
  19. weitsicht-0.0.1/src/weitsicht/geometry/intersection_plane.py +156 -0
  20. weitsicht-0.0.1/src/weitsicht/geometry/line_grid_intersection.py +216 -0
  21. weitsicht-0.0.1/src/weitsicht/geometry/ray_from_points.py +110 -0
  22. weitsicht-0.0.1/src/weitsicht/image/__init__.py +34 -0
  23. weitsicht-0.0.1/src/weitsicht/image/base_class.py +357 -0
  24. weitsicht-0.0.1/src/weitsicht/image/image_batch.py +356 -0
  25. weitsicht-0.0.1/src/weitsicht/image/image_dict_selector.py +53 -0
  26. weitsicht-0.0.1/src/weitsicht/image/ortho.py +588 -0
  27. weitsicht-0.0.1/src/weitsicht/image/perspective.py +620 -0
  28. weitsicht-0.0.1/src/weitsicht/mapping/__init__.py +41 -0
  29. weitsicht-0.0.1/src/weitsicht/mapping/base_class.py +193 -0
  30. weitsicht-0.0.1/src/weitsicht/mapping/georef_array.py +910 -0
  31. weitsicht-0.0.1/src/weitsicht/mapping/horizontal_plane.py +303 -0
  32. weitsicht-0.0.1/src/weitsicht/mapping/map_trimesh.py +332 -0
  33. weitsicht-0.0.1/src/weitsicht/mapping/mapping_dict_selector.py +67 -0
  34. weitsicht-0.0.1/src/weitsicht/mapping/raster.py +885 -0
  35. weitsicht-0.0.1/src/weitsicht/metadata/__init__.py +37 -0
  36. weitsicht-0.0.1/src/weitsicht/metadata/camera_alternative_tags.py +95 -0
  37. weitsicht-0.0.1/src/weitsicht/metadata/camera_database.py +41 -0
  38. weitsicht-0.0.1/src/weitsicht/metadata/camera_estimator_metadata.py +221 -0
  39. weitsicht-0.0.1/src/weitsicht/metadata/eor_from_meta.py +241 -0
  40. weitsicht-0.0.1/src/weitsicht/metadata/image_from_meta.py +115 -0
  41. weitsicht-0.0.1/src/weitsicht/metadata/metadata_results.py +97 -0
  42. weitsicht-0.0.1/src/weitsicht/metadata/tag_systems/__init__.py +3 -0
  43. weitsicht-0.0.1/src/weitsicht/metadata/tag_systems/pyexiftool_tags.py +271 -0
  44. weitsicht-0.0.1/src/weitsicht/metadata/tag_systems/tag_base.py +205 -0
  45. weitsicht-0.0.1/src/weitsicht/py.typed +0 -0
  46. weitsicht-0.0.1/src/weitsicht/transform/__init__.py +32 -0
  47. weitsicht-0.0.1/src/weitsicht/transform/coordinates_old.py +198 -0
  48. weitsicht-0.0.1/src/weitsicht/transform/coordinates_transformer.py +349 -0
  49. weitsicht-0.0.1/src/weitsicht/transform/rotation.py +339 -0
  50. weitsicht-0.0.1/src/weitsicht/transform/utm_converter.py +95 -0
  51. weitsicht-0.0.1/src/weitsicht/type_guards.py +101 -0
  52. weitsicht-0.0.1/src/weitsicht/utils.py +214 -0
  53. weitsicht-0.0.1/src/weitsicht.egg-info/PKG-INFO +489 -0
  54. weitsicht-0.0.1/src/weitsicht.egg-info/SOURCES.txt +81 -0
  55. weitsicht-0.0.1/src/weitsicht.egg-info/dependency_links.txt +1 -0
  56. weitsicht-0.0.1/src/weitsicht.egg-info/requires.txt +26 -0
  57. weitsicht-0.0.1/src/weitsicht.egg-info/top_level.txt +1 -0
  58. weitsicht-0.0.1/tests/test_ImageOrtho.py +270 -0
  59. weitsicht-0.0.1/tests/test_base_class.py +12 -0
  60. weitsicht-0.0.1/tests/test_cameraBasePerspective.py +196 -0
  61. weitsicht-0.0.1/tests/test_cameraOpenCVPerspective.py +169 -0
  62. weitsicht-0.0.1/tests/test_camera_estimator_metadata.py +52 -0
  63. weitsicht-0.0.1/tests/test_camera_model_selector.py +35 -0
  64. weitsicht-0.0.1/tests/test_coordinates_old.py +143 -0
  65. weitsicht-0.0.1/tests/test_coordinates_transformer.py +196 -0
  66. weitsicht-0.0.1/tests/test_coplanar_collinear.py +15 -0
  67. weitsicht-0.0.1/tests/test_examples_run.py +32 -0
  68. weitsicht-0.0.1/tests/test_georef_array.py +448 -0
  69. weitsicht-0.0.1/tests/test_imagePerspective.py +434 -0
  70. weitsicht-0.0.1/tests/test_image_batch.py +417 -0
  71. weitsicht-0.0.1/tests/test_image_from_meta_builder.py +71 -0
  72. weitsicht-0.0.1/tests/test_image_type_selector.py +53 -0
  73. weitsicht-0.0.1/tests/test_interpolation_bilinear.py +50 -0
  74. weitsicht-0.0.1/tests/test_intersection_bilinear.py +115 -0
  75. weitsicht-0.0.1/tests/test_line_grid_intersection.py +45 -0
  76. weitsicht-0.0.1/tests/test_mapper_type_selector.py +76 -0
  77. weitsicht-0.0.1/tests/test_mappingPlane.py +116 -0
  78. weitsicht-0.0.1/tests/test_meta_data.py +35 -0
  79. weitsicht-0.0.1/tests/test_raster.py +356 -0
  80. weitsicht-0.0.1/tests/test_rotation.py +108 -0
  81. weitsicht-0.0.1/tests/test_trimesh.py +183 -0
  82. weitsicht-0.0.1/tests/test_utils.py +35 -0
  83. weitsicht-0.0.1/tests/test_utm_converter.py +48 -0
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,489 @@
1
+ Metadata-Version: 2.4
2
+ Name: weitsicht
3
+ Version: 0.0.1
4
+ Summary: A package that uses image georeferencing for monoplotting (single-image pixel-to-3D ray/surface intersection) and for projecting 3D coordinates into an image. Supports perspective imagery and orthophotos.
5
+ Author: Martin Wieser
6
+ License:
7
+ Apache License
8
+ Version 2.0, January 2004
9
+ http://www.apache.org/licenses/
10
+
11
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
12
+
13
+ 1. Definitions.
14
+
15
+ "License" shall mean the terms and conditions for use, reproduction,
16
+ and distribution as defined by Sections 1 through 9 of this document.
17
+
18
+ "Licensor" shall mean the copyright owner or entity authorized by
19
+ the copyright owner that is granting the License.
20
+
21
+ "Legal Entity" shall mean the union of the acting entity and all
22
+ other entities that control, are controlled by, or are under common
23
+ control with that entity. For the purposes of this definition,
24
+ "control" means (i) the power, direct or indirect, to cause the
25
+ direction or management of such entity, whether by contract or
26
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
27
+ outstanding shares, or (iii) beneficial ownership of such entity.
28
+
29
+ "You" (or "Your") shall mean an individual or Legal Entity
30
+ exercising permissions granted by this License.
31
+
32
+ "Source" form shall mean the preferred form for making modifications,
33
+ including but not limited to software source code, documentation
34
+ source, and configuration files.
35
+
36
+ "Object" form shall mean any form resulting from mechanical
37
+ transformation or translation of a Source form, including but
38
+ not limited to compiled object code, generated documentation,
39
+ and conversions to other media types.
40
+
41
+ "Work" shall mean the work of authorship, whether in Source or
42
+ Object form, made available under the License, as indicated by a
43
+ copyright notice that is included in or attached to the work
44
+ (an example is provided in the Appendix below).
45
+
46
+ "Derivative Works" shall mean any work, whether in Source or Object
47
+ form, that is based on (or derived from) the Work and for which the
48
+ editorial revisions, annotations, elaborations, or other modifications
49
+ represent, as a whole, an original work of authorship. For the purposes
50
+ of this License, Derivative Works shall not include works that remain
51
+ separable from, or merely link (or bind by name) to the interfaces of,
52
+ the Work and Derivative Works thereof.
53
+
54
+ "Contribution" shall mean any work of authorship, including
55
+ the original version of the Work and any modifications or additions
56
+ to that Work or Derivative Works thereof, that is intentionally
57
+ submitted to Licensor for inclusion in the Work by the copyright owner
58
+ or by an individual or Legal Entity authorized to submit on behalf of
59
+ the copyright owner. For the purposes of this definition, "submitted"
60
+ means any form of electronic, verbal, or written communication sent
61
+ to the Licensor or its representatives, including but not limited to
62
+ communication on electronic mailing lists, source code control systems,
63
+ and issue tracking systems that are managed by, or on behalf of, the
64
+ Licensor for the purpose of discussing and improving the Work, but
65
+ excluding communication that is conspicuously marked or otherwise
66
+ designated in writing by the copyright owner as "Not a Contribution."
67
+
68
+ "Contributor" shall mean Licensor and any individual or Legal Entity
69
+ on behalf of whom a Contribution has been received by Licensor and
70
+ subsequently incorporated within the Work.
71
+
72
+ 2. Grant of Copyright License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ copyright license to reproduce, prepare Derivative Works of,
76
+ publicly display, publicly perform, sublicense, and distribute the
77
+ Work and such Derivative Works in Source or Object form.
78
+
79
+ 3. Grant of Patent License. Subject to the terms and conditions of
80
+ this License, each Contributor hereby grants to You a perpetual,
81
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
82
+ (except as stated in this section) patent license to make, have made,
83
+ use, offer to sell, sell, import, and otherwise transfer the Work,
84
+ where such license applies only to those patent claims licensable
85
+ by such Contributor that are necessarily infringed by their
86
+ Contribution(s) alone or by combination of their Contribution(s)
87
+ with the Work to which such Contribution(s) was submitted. If You
88
+ institute patent litigation against any entity (including a
89
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
90
+ or a Contribution incorporated within the Work constitutes direct
91
+ or contributory patent infringement, then any patent licenses
92
+ granted to You under this License for that Work shall terminate
93
+ as of the date such litigation is filed.
94
+
95
+ 4. Redistribution. You may reproduce and distribute copies of the
96
+ Work or Derivative Works thereof in any medium, with or without
97
+ modifications, and in Source or Object form, provided that You
98
+ meet the following conditions:
99
+
100
+ (a) You must give any other recipients of the Work or
101
+ Derivative Works a copy of this License; and
102
+
103
+ (b) You must cause any modified files to carry prominent notices
104
+ stating that You changed the files; and
105
+
106
+ (c) You must retain, in the Source form of any Derivative Works
107
+ that You distribute, all copyright, patent, trademark, and
108
+ attribution notices from the Source form of the Work,
109
+ excluding those notices that do not pertain to any part of
110
+ the Derivative Works; and
111
+
112
+ (d) If the Work includes a "NOTICE" text file as part of its
113
+ distribution, then any Derivative Works that You distribute must
114
+ include a readable copy of the attribution notices contained
115
+ within such NOTICE file, excluding those notices that do not
116
+ pertain to any part of the Derivative Works, in at least one
117
+ of the following places: within a NOTICE text file distributed
118
+ as part of the Derivative Works; within the Source form or
119
+ documentation, if provided along with the Derivative Works; or,
120
+ within a display generated by the Derivative Works, if and
121
+ wherever such third-party notices normally appear. The contents
122
+ of the NOTICE file are for informational purposes only and
123
+ do not modify the License. You may add Your own attribution
124
+ notices within Derivative Works that You distribute, alongside
125
+ or as an addendum to the NOTICE text from the Work, provided
126
+ that such additional attribution notices cannot be construed
127
+ as modifying the License.
128
+
129
+ You may add Your own copyright statement to Your modifications and
130
+ may provide additional or different license terms and conditions
131
+ for use, reproduction, or distribution of Your modifications, or
132
+ for any such Derivative Works as a whole, provided Your use,
133
+ reproduction, and distribution of the Work otherwise complies with
134
+ the conditions stated in this License.
135
+
136
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
137
+ any Contribution intentionally submitted for inclusion in the Work
138
+ by You to the Licensor shall be under the terms and conditions of
139
+ this License, without any additional terms or conditions.
140
+ Notwithstanding the above, nothing herein shall supersede or modify
141
+ the terms of any separate license agreement you may have executed
142
+ with Licensor regarding such Contributions.
143
+
144
+ 6. Trademarks. This License does not grant permission to use the trade
145
+ names, trademarks, service marks, or product names of the Licensor,
146
+ except as required for reasonable and customary use in describing the
147
+ origin of the Work and reproducing the content of the NOTICE file.
148
+
149
+ 7. Disclaimer of Warranty. Unless required by applicable law or
150
+ agreed to in writing, Licensor provides the Work (and each
151
+ Contributor provides its Contributions) on an "AS IS" BASIS,
152
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
153
+ implied, including, without limitation, any warranties or conditions
154
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
155
+ PARTICULAR PURPOSE. You are solely responsible for determining the
156
+ appropriateness of using or redistributing the Work and assume any
157
+ risks associated with Your exercise of permissions under this License.
158
+
159
+ 8. Limitation of Liability. In no event and under no legal theory,
160
+ whether in tort (including negligence), contract, or otherwise,
161
+ unless required by applicable law (such as deliberate and grossly
162
+ negligent acts) or agreed to in writing, shall any Contributor be
163
+ liable to You for damages, including any direct, indirect, special,
164
+ incidental, or consequential damages of any character arising as a
165
+ result of this License or out of the use or inability to use the
166
+ Work (including but not limited to damages for loss of goodwill,
167
+ work stoppage, computer failure or malfunction, or any and all
168
+ other commercial damages or losses), even if such Contributor
169
+ has been advised of the possibility of such damages.
170
+
171
+ 9. Accepting Warranty or Additional Liability. While redistributing
172
+ the Work or Derivative Works thereof, You may choose to offer,
173
+ and charge a fee for, acceptance of support, warranty, indemnity,
174
+ or other liability obligations and/or rights consistent with this
175
+ License. However, in accepting such obligations, You may act only
176
+ on Your own behalf and on Your sole responsibility, not on behalf
177
+ of any other Contributor, and only if You agree to indemnify,
178
+ defend, and hold each Contributor harmless for any liability
179
+ incurred by, or claims asserted against, such Contributor by reason
180
+ of your accepting any such warranty or additional liability.
181
+
182
+ END OF TERMS AND CONDITIONS
183
+
184
+ Project-URL: Homepage, https://github.com/MartinW-S2M/weitsicht
185
+ Project-URL: Bug Tracker, https://github.com/MartinW-S2M/weitsicht/issues
186
+ Keywords: Photogrammetry,Mapping,Georefernced Imagery,Geographical Data,Monoplotting
187
+ Classifier: Programming Language :: Python :: 3.10
188
+ Classifier: Programming Language :: Python :: 3.11
189
+ Classifier: Programming Language :: Python :: 3.12
190
+ Classifier: Programming Language :: Python :: 3.13
191
+ Classifier: Typing :: Typed
192
+ Classifier: License :: OSI Approved :: Apache Software License
193
+ Classifier: Operating System :: OS Independent
194
+ Classifier: Development Status :: 3 - Alpha
195
+ Classifier: Topic :: Scientific/Engineering
196
+ Classifier: Topic :: Scientific/Engineering :: GIS
197
+ Requires-Python: >=3.10
198
+ Description-Content-Type: text/markdown
199
+ License-File: LICENSE
200
+ Requires-Dist: numpy>=1.26.0
201
+ Requires-Dist: pyproj>=3.6.1
202
+ Requires-Dist: shapely>=2.0.1
203
+ Requires-Dist: rasterio>=1.3.8
204
+ Requires-Dist: trimesh>=4.6.8
205
+ Requires-Dist: rtree>=1.4.0
206
+ Requires-Dist: tomli>=2.4.0
207
+ Provides-Extra: test
208
+ Requires-Dist: pytest>=8.0.0; extra == "test"
209
+ Provides-Extra: coverage
210
+ Requires-Dist: coverage>=7.5.4; extra == "coverage"
211
+ Provides-Extra: docs
212
+ Requires-Dist: pydata_sphinx_theme; extra == "docs"
213
+ Requires-Dist: sphinx-design; extra == "docs"
214
+ Provides-Extra: develop
215
+ Requires-Dist: pre-commit; extra == "develop"
216
+ Requires-Dist: pyright; extra == "develop"
217
+ Requires-Dist: ruff; extra == "develop"
218
+ Requires-Dist: pytest>=8.0.0; extra == "develop"
219
+ Requires-Dist: coverage>=7.5.4; extra == "develop"
220
+ Requires-Dist: pydata_sphinx_theme; extra == "develop"
221
+ Requires-Dist: sphinx-design; extra == "develop"
222
+ Dynamic: license-file
223
+
224
+ <p align="center">
225
+ <a href=https://github.com/MartinW-S2M/weitsicht>
226
+ <img src="https://github.com/MartinW-S2M/weitsicht/blob/main/logos/weitsicht.svg" alt="weitsicht logo" width="240">
227
+ </p>
228
+
229
+ # weitsicht
230
+ [![pypi](https://img.shields.io/pypi/v/weitsicht)](https://pypi.org/project/weitsicht/)
231
+ ![Python Version 3.10,3.11,3.12,3.13](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue?style=flat&logo=python&logoColor=white)
232
+ [![License](https://img.shields.io/badge/License-Apache_2.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)
233
+
234
+
235
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
236
+ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
237
+ [![pep8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/)
238
+ ![PyPI - Types](https://img.shields.io/pypi/types/weitsicht)
239
+
240
+ ![tests](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MartinW-S2M/43e035fba612a7cf89ff180d3a41fc2f/raw/test_count.json)
241
+ ![cov](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MartinW-S2M/43e035fba612a7cf89ff180d3a41fc2f/raw/covbadge.json)
242
+ &emsp;&emsp;![loc](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MartinW-S2M/43e035fba612a7cf89ff180d3a41fc2f/raw/loc.json)
243
+ ![comments](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/MartinW-S2M/43e035fba612a7cf89ff180d3a41fc2f/raw/comments.json)
244
+
245
+ [![Tests](https://github.com/MartinW-S2M/weitsicht/actions/workflows/tests.yml/badge.svg)](https://github.com/MartinW-S2M/weitsicht/actions/workflows/tests.yml)
246
+ &emsp;&emsp;
247
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/MartinW-S2M/weitsicht/main.svg)](https://results.pre-commit.ci/latest/github/MartinW-S2M/weitsicht/main)
248
+ &emsp;&emsp;![Docs passing](https://app.readthedocs.org/projects/weitsicht/badge/?version=latest)
249
+
250
+
251
+ **Python package to use the direct geo-reference information of images for mapping and projection.**
252
+
253
+ Its designed to simplify the use and implementation of functions and classes needed all the way from image points to mapped
254
+ 3d points or the other way around from 3d point to image points.
255
+ Additionally, it is easy to get information like mapped image footprints, center points or transform them to other coordinate systems. Single-image ray intersection with a ground/3D model is often called **Monoplotting** (in ``weitsicht`` this is what the image ``map_*`` methods like ``map_points`` / ``map_center_point`` / ``map_footprint`` do with a mapper).
256
+
257
+ There are classes for camera models, images, mapping functions and additional utils which simplify and abstract to a level where non-photogrammetry experts can work with it.
258
+
259
+ Currently, it is possible to use perspective and ortho-imagery and for mapping a horizontal plane, rasters (e.g. DSM) and meshes.
260
+
261
+ <table>
262
+ <tr>
263
+ <td><img src="docs/source/_static/raster_mapping.jpg" alt="Raster mapping example" width="80%"></td>
264
+ <td><img src="docs/source/_static/mesh_pic.jpg" alt="Mesh example" width="80%"></td>
265
+ <td><img src="docs/source/_static/example_images/image_batch_footprints.jpg" alt="Image batch footprints" width="100%"></td>
266
+ </tr>
267
+ </table>
268
+
269
+ **Capabilities**:
270
+
271
+ - **Monoplotting/Mapping**, map the image’s center-point and footprint (image extend) or image point easily.
272
+ - **Projection**, get the pixel position of 3D coordinates.
273
+ - **CRS**, weitsicht handles coordinate system conversions (to some extend)
274
+ - **Perspective Image and Camera**, mathematic model of your digital camera and pose.
275
+ - **Ortho imagery**, use ortho imagery to map contant or convert 2D coordinates to 3D.
276
+ - **Mapper Classes**, several mapper classes can be used to map your pixel data: HorizontalPlane, Raster, Mesh
277
+ - **ImageBatch**, container class to perform tasks on multiple images. Find all images where coordinates are visible. Map for all images footprint and centerpoint.
278
+ - **Meta-Data**, use image’s meta-data (EXIF, XMP) to estimate camera model and image pose.
279
+
280
+
281
+ ## Table of Contents
282
+ - [Installation](#installation)
283
+ - [Dependencies](#dependencies)
284
+ - [Documentation](#documentation)
285
+ - [Brief History](#brief-history)
286
+ - [Goals](#goals)
287
+ - [Future Plans](#future-plans)
288
+ - [Contribution](#contribution)
289
+ - [Discussion](#discussion)
290
+ - [Package Structure](#package-structure)
291
+ - [Example Usage](#example-usage)
292
+ - [Notes on PyProj](#notes-on-pyproj)
293
+ - [License](#licence)
294
+
295
+ ## Installation
296
+ The source code is currently hosted on GitHub at: https://github.com/MartinW-S2M/weitsicht
297
+
298
+ ### PyPI
299
+ Binary installers for the latest released version are available at the [Python
300
+ Package Index (PyPI)] https://pypi.org/project/weitsicht/
301
+ ```
302
+ pip install weitsicht
303
+ ```
304
+
305
+ ### From Source
306
+ In the `weitsicht` directory (same one where you found this file after cloning the git repo), execute:
307
+ ```
308
+ pip install .
309
+
310
+ # include test dependencies
311
+ pip install .[test]
312
+ ```
313
+
314
+ Tests use ``pytest`` and live in the **tests** folder. As well all scripts within **examples** are tested.
315
+ For testing Internet access has to be available as pyproj will download needed rasters (e.g EGM2008 earth gravity model)
316
+ Alternative its possible to tell pyproj to use local stored grids/data - see [pyproj-datadir](https://pyproj4.github.io/pyproj/stable/api/datadir.html)
317
+
318
+ ### Installation of 3rd-party dependencies
319
+ To provide a full simple workflow a package to read metadata is needed. see [Dependencies](#dependencies)
320
+
321
+ ## Dependencies
322
+
323
+ ### Python
324
+ weitsicht runs on **Python 3.10+**.
325
+ weitsicht has been tested on Windows, Linux and MacOS, and probably also runs on other Unix-like platforms.
326
+
327
+ ### Packages
328
+ It relies only on well-developed packages
329
+ - [numpy](https://www.numpy.org)
330
+ - [pyproj - Python interface to proj](https://pyproj4.github.io/pyproj/stable)
331
+ - [rasterio - Easy access to geospatial raster](https://rasterio.readthedocs.io/en/stable)
332
+ - [shapely](https://shapely.readthedocs.io/en/stable/index.html)
333
+ - [trimesh](https://trimesh.org/)
334
+
335
+ Additionally, to provide a workflow for drone imagery the metadata from images has to be extracted.
336
+ You can use Phil Harvey's exiftool together with [PyExifTool](https://sylikc.github.io/pyexiftool/index.html).
337
+ Although long‑term maintenance of those packages is not clear, Phil Harvey's tool provides to date the most complete metadata
338
+ reader for most image formats, including raw camera files. In ``weitsicht`` provides an interface for different exiftool wrappers, but currently only a parser for tags from PyExifTool is implemented. A exiv2 parser would be very welcome as contributions.
339
+
340
+ ## Documentation
341
+ The current documentation is available at [weitsicht.readthedocs.io](https://weitsicht.readthedocs.io)
342
+ There you will also find information about the mathematical background and definitions.
343
+ ANy contributions are welcome for extending documentation.
344
+
345
+ ## Brief History
346
+ weitsicht was formerly part of **WISDAM (Wildlife Imagery Survey – Detection and Mapping)** (and its predecessor DugongDetector) but is now provided as its own python package.
347
+ It is used as the photogrammetry/mapping core of WISDAMapp to map images, objects and project them back into images.
348
+ This allows the users to assign groups, spatial metadata and find resights.
349
+
350
+ **WISDAMapp (Wildlife Imagery Survey – Detection and Mapping)** is a python GUI framework based on QT for the digitization and metadata enrichment of objects
351
+ digitized in images and ortho-photos. Geo-referenced imagery can be used to map digitized objects to 3D or project them back into images for the purpose of grouping
352
+
353
+ **The WISDAMapp repository can be found under http://www.github.com/WISDAMapp/**
354
+
355
+ Currently WISDAMapp undergoes refactoring to switch from the old WISDAMcore to ``weitsicht``
356
+
357
+
358
+ ## Goals
359
+ The intention of weitsicht is to provide the community an easy-to-use package to deal with geo-referenced imagery.
360
+ No matter if environmental science, geomatic, GIS or drone community more and more imagery is available (mostly from drones/UAS) which can be used to perform mapping operations.
361
+
362
+ Many users can’t leverage their imagery beyond basic tasks without photogrammetry/SfM software; we aim to bridge that gap.
363
+
364
+ ## Future Plans
365
+ As the package is currently very basic, already a few topics are around which could be implemented:
366
+ + Extend image and camera model classes (For example, 360degree imagery)
367
+ + Extend Rotation class to other common notations.
368
+ + Import/Conversion of the results from photogrammetry / sfm packages.
369
+ + Improve mapping on mesh. (holes in the mesh are currently a problem)
370
+ + Provide ability to save derived geometries.
371
+ + Maybe switch coordinate class to use geopandas.
372
+ + Provide ability to use network assets for mapping (e.g. Cloud optimized geotiff)
373
+
374
+
375
+ ## Discussion
376
+ Use the discussion page for questions, support, and general discussion.
377
+
378
+ ## Contribution
379
+ Contributions are highly welcome to extend the package.
380
+ All levels of contributions are welcome from extending the docs, examples, mathematical discussions, coding, test implementations, providing test samples.
381
+ Please find more info in CONTRIBUTION.md
382
+
383
+ ## Package Structure
384
+
385
+ > [!IMPORTANT]
386
+ > weitsicht uses pyproj and using the setting always_xy for all Transformers.
387
+
388
+ weitsicht was designed with flexibility and extensibility in mind.
389
+ The library consists of a few classes, each with increasingly more features.
390
+
391
+ * ``weitsicht.camera`` is the sub package for camera models (e.g. OpenCV camera model)
392
+ It contains only the mathematical model used to transform 2D image coordinates to 3D coordinates in the camera system
393
+ and backwards. This class mostly does not need to be called itself on a basic level but is used by the image class.
394
+ New classes can be easily implemented or extended.
395
+
396
+
397
+ * ``weitsicht.image`` is the subpackage which provides image classes. It is used to deal with the geo-reference
398
+ information which states the image pose in 3D space. Main functions of the classes are:
399
+ * project: Project 3D coordinates into image 2D space
400
+ * map_points: Map pixel points into 3D space using a provided mapper.
401
+
402
+
403
+ * ``weitsicht.mapping`` is the subpackage which provides mapping classes.
404
+ Currently, mapping bases on a horizontal plane (mappingPlane) and mapping based on raster (mappingRaster) using rasterio.
405
+ Main functions of the classes are:
406
+ * map_heights_from_coordinates: Get the height of coordinates.
407
+ * map_coordinates_from_rays: Get the intersection coordinates of a ray in 3D space
408
+
409
+
410
+ * ``weitsicht.transform`` is the subpackage which provides transformation classes and functions
411
+ * cooTransformer class: Transform points using pyproj. Also provides an option to create geojson dict
412
+ * utm_converter: Convert a coordinate to WGS84/utm and get crs class as well
413
+ * rotation class: Class dealing with Rotation matrices used in photogrammetry
414
+
415
+ > [!NOTE]
416
+ > Some additional helper functions are needed to be used by WISDAM (e.g. the function to load classes by a dictionary)
417
+
418
+ ## Example Usage
419
+
420
+ ### Map Pixels to ground with height 0.0
421
+
422
+ import numpy as np
423
+ import pyproj
424
+ from pyproj import CRS
425
+
426
+ from weitsicht import (CameraOpenCVPerspective, ImagePerspective, MappingHorizontalPlane)
427
+ from weitsicht import Rotation
428
+
429
+ # To directly download the grids needed for coordinate transformation we enable the network capability of proj
430
+ pyproj.network.set_network_enabled(True)
431
+
432
+ # Construct Mapper
433
+ # We use the horizontal plane mapper in the CRS System WGS84 with EGM2008 heights
434
+ crs_mapper = CRS("EPSG:4326+3855")
435
+ mapper = MappingHorizontalPlane(plane_altitude=0.0, crs=crs_mapper)
436
+
437
+ # Camera Model
438
+ # The camera model's width and height is the image shape which was used during calibration,
439
+ # allowing the image class to use resampled images.
440
+ cam = CameraOpenCVPerspective(width=6000, height=4000, fx=2360, fy=2360)
441
+
442
+ # Image Pose
443
+ position = np.array([602013.0, 5340384.696, 100.0])
444
+ orientation = Rotation.from_opk_degree(omega=1.5, phi=5.6, kappa=65.0)
445
+
446
+ # Image Coordinate Reference System
447
+ crs = CRS("EPSG:25833+3855") # UTM Zone 33
448
+ image = ImagePerspective(width=6000, height=4000, mapper=mapper, camera=cam,
449
+ crs=crs, position=position, orientation=orientation)
450
+
451
+ # Map to image coordinates
452
+ result = image.map_points(np.array([[2000,300],[2300, 400]]))
453
+ if result.ok:
454
+ print("GSD of points: %f" % result.gsd)
455
+ print("Coordinates mapped", *result.coordinates)
456
+
457
+
458
+ Refer to documentation for more examples http://weitsicht.github.io/
459
+
460
+ ## Notes on PyProj
461
+ This packages heavily depends on pyproj CRS and Transformer/TransformerGroups.
462
+
463
+ > [!IMPORTANT]
464
+ > weitsicht uses the setting always_xy for all Transformers.
465
+ > Except you are constructing your own transformation pipeline
466
+
467
+ The user must take care that all data is available for the Transformation needed
468
+ ([Pyproj - Datadir](https://pyproj4.github.io/pyproj/stable/api/datadir.html)) or the network option is enabled
469
+ ([Pyproj - Network settings ](https://pyproj4.github.io/pyproj/stable/api/network.html#proj-network-settings)).
470
+
471
+ pyproj.network.set_network_enabled(True)
472
+
473
+ All transformation are done by `Transformer.from_crs()`.
474
+ Standard option is to allow only best transformations and an exception will be raised otherwise (Including ballpark transformations,
475
+ [PyProj - Transformer](https://pyproj4.github.io/pyproj/stable/api/transformer.html#pyproj.transformer.Transformer.from_crs)).
476
+ To allow ballpark and allow also other than the best transformations, set:
477
+
478
+ weitsicht.allow_ballpark_transformations() # sets cfg._ballpark_transformation to True
479
+ # is the same as allow_ballpark_transformations(True), to disallow set to False
480
+
481
+ weitsicht.allow_non_best_transformations() # sets cfg._only_best_transformation to False
482
+ # is the same as allow_non_best_transformations(True), to disallow set to False
483
+
484
+ ## Licence
485
+ weitsicht is licensed under the Apache License, Version 2.0 (Apache-2.0).
486
+
487
+ See `LICENSE` for the full license text.
488
+
489
+ [Go to Top](#table-of-contents)