From 8dce82066d8b6eb8538783e48026c05a49b8c198 Mon Sep 17 00:00:00 2001 From: ACornuIGN Date: Tue, 10 Dec 2024 09:38:26 +0100 Subject: [PATCH] doc: update readme on dependency and installation --- README.md | 23 ++++++++++++++++++----- README_borea_lib.md | 7 ++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e1255bf..c41cd06 100644 --- a/README.md +++ b/README.md @@ -21,18 +21,32 @@ Why Borea? B for Box and orea is a back slang of aero. ## Dependency +Borea needs: +- python >= 3.9 +- gdal >= 3.3.2 +- numpy <= 1.26.4 +- pyproj +- scipy +- pandas +- dataclasses + ### Conda/Mamba -For conda/mamba environment the depencency is [borea_dependency/environment.yml](./borea_dependency/environment.yml). +For conda/mamba environment is [borea_dependency/environment.yml](./borea_dependency/environment.yml). ### Pip venv -For pip environment (venv) the depencency is [borea_dependency/requirements.txt](./borea_dependency/requirements.txt) +For pip environment (venv) is [borea_dependency/requirements.txt](./borea_dependency/requirements.txt) and you need to install `libgdal-dev` and `GDAL>=3.3.2`. ## Installation -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```. +There are two ways to install Borea with the repository `git clone` or with pip `pip install ign-borea` [doc](./README_borea_lib.md). + +With **the repository**, you also need to install the environment. +With **pip** the environment comes with it but does not contain GDAL, which you have to install yourself. +### Installation of the environment #### Conda/Mamba +GDAL is contained and installed in the conda/mamba environment. ``` conda env create -f ./borea_dependency/environment.yaml ``` @@ -41,8 +55,7 @@ mamba env create -f ./borea_dependency/environment.yaml ``` #### Pip -The package exists on pip with `pip install ign-borea` without GDAL - +GDAL is not included in the pip environment, so you have to install it yourself. ``` pip install -r ./borea_dependency/requirements.txt sudo apt-get install libgdal-dev diff --git a/README_borea_lib.md b/README_borea_lib.md index fc9decb..1fe1333 100644 --- a/README_borea_lib.md +++ b/README_borea_lib.md @@ -27,6 +27,11 @@ pip install GDAL== ``` 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. +#### Conda/Mamba + +You create your conda/mamba environment with pip in it, then in the environment you install borea with `pip install ign-borea` and GDAL with `conda install GDAL` or `mamba install GDAL`. +Note: GDAL version must be >= 3.3.2 + #### In the QGIS environment View the doc on [borea github docs/installation/In_QGIS.md](https://github.com/IGNF/Borea/tree/main/docs/installation/In_QGIS.md). @@ -101,7 +106,7 @@ The DataFrame **pt3d** is a table with 5 column and n line. The id of column mus it can be created with the function `read_file_pt_dataframe(path_file_pt,header_file,"pt3d")` 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`. -Example at the end of explanation of function [file](https://github.com/IGNF/Borea/tree/main/docs/functions/Space_resection.md). +Example at the end of explanation of function [file](https://github.com/IGNF/Borea/tree/main/examples/eg_space_resection.py) l.38. * 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*.