Skip to content

Commit

Permalink
Merge pull request #133 from IGNF/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ACornuIGN authored May 27, 2024
2 parents e010f65 + e27ce57 commit a0aa965
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Welcome to Borea !!!
[![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)](
https://pypi.org/project/ign-borea/)

Borea is an open-source tools-box photogrammetric conversion format and transformation coordinate of image and terrain.
Why Borea? B for Box and orea is a back slang of aero.
Expand Down
3 changes: 3 additions & 0 deletions README_borea_lib.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![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)](
https://pypi.org/project/ign-borea/)

Borea is an open-source python package tools-box photogrammetric conversion format and transformation coordinate of image and terrain.
Why Borea? **B** for Box and **orea** is a back slang of aero.

Expand Down
Binary file modified docs/sphinx/_build/doctrees/borea.utils.singleton.doctree
Binary file not shown.
Binary file modified docs/sphinx/_build/doctrees/environment.pickle
Binary file not shown.
1 change: 1 addition & 0 deletions docs/sphinx/_build/html/_modules/borea/format/conl.html
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ <h1>Source code for borea.format.conl</h1><div class="highlight"><pre>
<span class="n">ppa</span> <span class="o">=</span> <span class="n">ET</span><span class="o">.</span><span class="n">SubElement</span><span class="p">(</span><span class="n">sensor</span><span class="p">,</span> <span class="s2">&quot;ppa&quot;</span><span class="p">)</span>
<span class="n">add_elem</span><span class="p">(</span><span class="n">ppa</span><span class="p">,</span> <span class="n">B_CAM</span><span class="p">,</span> <span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">cam</span><span class="o">.</span><span class="n">ppax</span><span class="p">),</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">cam</span><span class="o">.</span><span class="n">ppay</span><span class="p">),</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">cam</span><span class="o">.</span><span class="n">focal</span><span class="p">)])</span>

<span class="c1"># pylint: disable-next=pointless-string-statement</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot; if self.shot.f_sys:</span>
<span class="sd"> transfo2d = ET.SubElement(sensor, &quot;transfo2d&quot;)</span>
<span class="sd"> tr2delem = ET.SubElement(transfo2d, &quot;tr2delem&quot;)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ <h1>Source code for borea.transform_world_image.transform_worksite.image_world_w
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">dataclasses</span> <span class="kn">import</span> <span class="n">dataclass</span>
<span class="kn">from</span> <span class="nn">borea.worksite.worksite</span> <span class="kn">import</span> <span class="n">Worksite</span>
<span class="kn">from</span> <span class="nn">borea.transform_world_image.transform_worksite.image_world_intersection</span> <span class="kn">import</span> <span class="n">WorldIntersection</span>
<span class="c1"># pylint: disable-next=line-too-long</span>
<span class="kn">from</span> <span class="nn">borea.transform_world_image.transform_worksite.image_world_intersection</span> <span class="kn">import</span> <span class="n">WorldIntersection</span> <span class="c1"># noqa: E501</span>
<span class="kn">from</span> <span class="nn">borea.transform_world_image.transform_worksite.image_world_least_square</span> <span class="kn">import</span> <span class="n">WorldLeastSquare</span>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ <h1>Source code for borea.transform_world_image.transform_worksite.space_resecti
<span class="kn">from</span> <span class="nn">borea.datastruct.shot</span> <span class="kn">import</span> <span class="n">Shot</span>
<span class="kn">from</span> <span class="nn">borea.transform_world_image.transform_shot.world_image_shot</span> <span class="kn">import</span> <span class="n">WorldImageShot</span>
<span class="kn">from</span> <span class="nn">borea.transform_world_image.transform_shot.image_world_shot</span> <span class="kn">import</span> <span class="n">ImageWorldShot</span>
<span class="kn">from</span> <span class="nn">borea.transform_world_image.transform_worksite.image_world_intersection</span> <span class="kn">import</span> <span class="n">WorldIntersection</span>
<span class="c1"># pylint: disable-next=line-too-long</span>
<span class="kn">from</span> <span class="nn">borea.transform_world_image.transform_worksite.image_world_intersection</span> <span class="kn">import</span> <span class="n">WorldIntersection</span> <span class="c1"># noqa: E501</span>
<span class="kn">from</span> <span class="nn">borea.utils.miscellaneous.param_bundle</span> <span class="kn">import</span> <span class="n">set_param_bundle_diff</span>


Expand Down Expand Up @@ -602,6 +603,7 @@ <h1>Source code for borea.transform_world_image.transform_worksite.space_resecti
<span class="sd"> tuple: np.array(obs_image), np.array(pt_world).</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">add_pt</span> <span class="o">=</span> <span class="kc">True</span>
<span class="n">pt_world_random</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">if</span> <span class="n">shot</span><span class="o">.</span><span class="n">co_points</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">work</span><span class="o">.</span><span class="n">co_pts_world</span><span class="p">:</span>
<span class="n">WorldIntersection</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">work</span><span class="p">)</span><span class="o">.</span><span class="n">calculate_image_world_by_intersection</span><span class="p">(</span><span class="s2">&quot;co_points&quot;</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,17 @@
<article role="main" id="furo-main-content">
<h1>Source code for borea.utils.singleton.singleton</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">Module dor class singleton</span>
<span class="sd">Module for class singleton</span>
<span class="sd">&quot;&quot;&quot;</span>


<div class="viewcode-block" id="Singleton">
<a class="viewcode-back" href="../../../../borea.utils.singleton.html#borea.utils.singleton.singleton.Singleton">[docs]</a>
<span class="k">class</span> <span class="nc">Singleton</span><span class="p">(</span><span class="nb">type</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Class Singletonfor dtm.</span>
<span class="sd"> Class Singleton for Dtm and ProjEngine.</span>
<span class="sd"> It&#39;s a design pattern, belonging to the category of creation patterns,</span>
<span class="sd"> whose aim is to restrict the instantiation of a class to a single object.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">_instances</span> <span class="o">=</span> <span class="p">{}</span>

Expand Down
6 changes: 4 additions & 2 deletions docs/sphinx/_build/html/borea.utils.singleton.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,14 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
</section>
<section id="module-borea.utils.singleton.singleton">
<span id="borea-utils-singleton-singleton-module"></span><h2>borea.utils.singleton.singleton module<a class="headerlink" href="#module-borea.utils.singleton.singleton" title="Link to this heading"></a></h2>
<p>Module dor class singleton</p>
<p>Module for class singleton</p>
<dl class="py class">
<dt class="sig sig-object py" id="borea.utils.singleton.singleton.Singleton">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">borea.utils.singleton.singleton.</span></span><span class="sig-name descname"><span class="pre">Singleton</span></span><a class="reference internal" href="_modules/borea/utils/singleton/singleton.html#Singleton"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#borea.utils.singleton.singleton.Singleton" title="Link to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">type</span></code></p>
<p>Class Singletonfor dtm.</p>
<p>Class Singleton for Dtm and ProjEngine.
It’s a design pattern, belonging to the category of creation patterns,
whose aim is to restrict the instantiation of a class to a single object.</p>
<dl class="py method">
<dt class="sig sig-object py" id="borea.utils.singleton.singleton.Singleton.clear">
<span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/borea/utils/singleton/singleton.html#Singleton.clear"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#borea.utils.singleton.singleton.Singleton.clear" title="Link to this definition"></a></dt>
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/_build/html/searchindex.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions docs/use_cases/QGIS_OTB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# QGIS and OTB

[QGIS](https://www.qgis.org/en/site/) is a Free and Open Source Geographic Information System (GIS) with many plugins for manipulating geographic data, such as aerial, satellite or drone images. What's more, this GIS is compatible with [Orfeo ToolBox (OTB)](https://www.orfeo-toolbox.org/), a free open-source library developed by the French CNES that enables GDAL-readable image manipulation. OTB can also be used with terminal commands or its Python API.

## Image oriented 🖼️

QGIS does not read OPK files for image orientation, but reads <name_img>_RPC.TXT files that are in the same directory as the images. The <name_img>_RPC.TXT files are gdal RPCs (Rational Polynomial Coefficient) that enable image orientation using coefficients in the **WGS84 epsg:4326 projection**.

The Borea command for writing image RPC files is [opk_to_rpc.py](../../borea_tools/docs_tools/README_opk_to_rpc.md).
This allows you to have oriented images and perform calculations on them, such as homologous point searches with OTB's **HomologousPointsExtraction** tool.

## Limit

Please note that some QGIS tools won't work on .jp2 oriented images, so you'll need to export them to Geotiff before you can process them.

0 comments on commit a0aa965

Please sign in to comment.