Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
*.dbf
*.png
*.pyc
*.ipynb_checkpoints
*.ipynb_checkpoints
build/
*.egg-info
__pycache__/*
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Eolabtools

Eolabtools allows to use various tools for satellite imagery analysis.
Full documentation is available at [eolabtools.readthedocs.io](https://eolabtools.readthedocs.io).

Eolabtools allows to use various tools for satellite imagery analysis.
## Detection Orientation Culture

# Detection Orientation Culture

## Installation procedure
### Installation procedure

To install DetectionOrientationCulture, please launch the following commands :

```bash
conda create -n orcult_env python=3.12 libgdal=3.11.0 -c conda-forge -c defaults -y
conda create -n orcult_env -c conda-forge python=3.11 numpy=1.26.4 gdal=3.11.5 pandas=1.5.3 geopandas=0.14.4 rasterio fiona scikit-learn opencv pyyaml
conda activate orcult_env
pip install eolabtools[DetecOrCult]
pip install opencv-contrib-python "eolabtools[DetecOrCult]"
```

## Usage
### Usage

To obtain the crop orientation in a shapefile format, please use the following command. The method implemented uses the fld library from openCV.

Expand Down Expand Up @@ -43,21 +43,21 @@ plots are calculated.
supplied as input.- ``--osm-config`` : Path to the OSM configuration file with tags to keep in binary raster


# Night OSM Registration
## Night OSM Registration

This tool performs night visible data registration based on OSM reference.

## Installation procedure
### Installation procedure

To install NightOsmRegistration, please launch the following commands :

```bash
conda create -n nightosm_env python=3.12 libgdal=3.11.0 markupsafe -c conda-forge
conda create -n nightosm_env -c conda-forge python=3.12 gdal=3.11.5 pyrosm rasterio numpy pyogrio geopandas opencv matplotlib pyyaml fiona scikit-image
conda activate nightosm_env
pip install eolabtools[NightOsmReg]
pip install "eolabtools[NightOsmReg]"
```

## Using night_osm_image_registration
### Using night_osm_image_registration

Use the command ``night_osm_image_registration`` with the following arguments :

Expand All @@ -80,7 +80,7 @@ Arguments are the following :

- ``--osm-config`` : Path to the OSM configuration file with tags to keep in binary raster

## Using night_osm_vector_registration
### Using night_osm_vector_registration

Use the command ``night_osm_vector_registration`` with the following arguments :

Expand All @@ -102,7 +102,7 @@ Arguments are the following :

- ``-n``, ``--name`` : Basename for the output file.

# Sun Map Generation
## Sun Map Generation

SunMapGeneration generates a map per date with the percentage of sun exposure over the time range, as well as a vector file that
gives the transition times from shade to sun (and sun to shade) for each pixel at the first date.
Expand All @@ -114,19 +114,19 @@ Shadow masks can also be produced at each step.
If the area of interest is important, the DSM should be divided into tiles beforehand (typically 1km*1km). The list of tiles is
given as input. The tool will manage the shadow impact on adjacent tiles.

## Installation procedure
### Installation procedure


To install SunMapGeneration, please launch the following commands :

```bash
conda create -n sunmap_env python=3.12 libgdal=3.5.0 -c conda-forge -c defaults -y
conda create -n sunmap_env -c conda-forge python=3.12 numpy=1.26.4 gdal=3.9.3 rasterio timezonefinder pytz ephem pyyaml click geopandas kiwisolver matplotlib fiona scipy pyscaffold tqdm
conda activate sunmap_env
pip install georastertools --no-binary rasterio
pip install eolabtools[SunMapGen] --force-reinstall --no-cache-dir
pip install georastertools
pip install "eolabtools[SunMapGen]"
```

## Usage
### Usage

To launch SunMapGeneration, please use the following command :

Expand Down Expand Up @@ -160,14 +160,14 @@ sun_map_generation --digital_surface_model /path_to_input_files/input_files.lst
- ``--save_masks`` : To save shadow masks calculated at each time step


# Tests
## Tests

The project comes with a suite functional tests. To run them,
launch the command ``pytest tests``. To run a specific test, execute ``pytest tests/test_toolname.py::test_name``.
The tests perform comparisons between generated files and reference files.


# Documentation generation
## Documentation generation

To generate the documentation, run in an environment that contains `sphinx_rtd_theme` and `sphinxcontrib.bibtex` :

Expand Down
14 changes: 7 additions & 7 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ To install SunMapGeneration, please launch the following commands :

.. code-block:: console

conda create -n sunmap_env python=3.12 libgdal=3.5.0 -c conda-forge -c defaults -y
conda create -n sunmap_env -c conda-forge python=3.12 numpy=1.26.4 gdal=3.9.3 rasterio timezonefinder pytz ephem pyyaml click geopandas kiwisolver matplotlib fiona scipy pyscaffold tqdm
conda activate sunmap_env
pip install georastertools --no-binary rasterio
pip install eolabtools[SunMapGen] --force-reinstall --no-cache-dir
pip install georastertools "eolabtools[SunMapGen]"


NightOsmRegistration installation
Expand All @@ -28,9 +27,10 @@ To install NightOsmRegistration, please launch the following commands :

.. code-block:: console

conda create -n nightosm_env python=3.12 libgdal=3.11.0 markupsafe -c conda-forge
conda create -n nightosm_env -c conda-forge python=3.12 gdal=3.11.5 pyrosm rasterio numpy pyogrio geopandas opencv matplotlib pyyaml fiona scikit-image
conda activate nightosm_env
pip install eolabtools[NightOsmReg]
pip install "eolabtools[NightOsmReg]"


DetectionOrientationCulture installation
=================================
Expand All @@ -39,6 +39,6 @@ To install DetectionOrientationCulture, please launch the following commands :

.. code-block:: console

conda create -n orcult_env python=3.12 libgdal=3.11.0 -c conda-forge -c defaults -y
conda create -n orcult_env -c conda-forge python=3.11 numpy=1.26.4 gdal=3.11.5 pandas=1.5.3 geopandas=0.14.4 rasterio fiona scikit-learn opencv pyyaml
conda activate orcult_env
pip install eolabtools[DetecOrCult]
pip install opencv-contrib-python "eolabtools[DetecOrCult]"
39 changes: 22 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@ classifiers = [
]

[project.optional-dependencies]
NightOsmReg = [
Dev = [
"pytest",
"pytest-cov",
"sphinx"
]
NightOsmReg = [
"pyyaml",
"numpy",
"gdal==3.11.0",
"fiona==1.9.6",
"pandas<3",
"gdal==3.11.5",
"fiona",
"pyogrio",
"shapely>=2",
"geopandas",
Expand All @@ -36,32 +40,33 @@ NightOsmReg = [
"matplotlib"
]
SunMapGen = [
"pytest",
"pytest-cov",
"pyyaml",
"gdal==3.5.0",
"numpy<2",
"gdal==3.9.3",
"georastertools",
"rasterio",
"numpy==1.26.4",
"timezonefinder",
"ephem"
"ephem",
"pytz"
]
DetecOrCult = [
"pytest",
"pytest-cov",
"pyyaml",
"geopandas==0.12.2",
"fiona==1.9.6",
"numpy==1.26.4",
"fiona",
"rasterio",
"gdal==3.11.0",
"scikit-learn",
"opencv-contrib-python",
"gdal==3.11.5",
"pandas==1.5.3",
"geopandas==0.14.4",
"rasterstats",
"numpy==1.26.4",
"pandas==1.5.3"
"scikit-learn",
"opencv-python",
"opencv-contrib-python"
]

[project.urls]
homepage = "https://github.com/CNES/eolabtools"
repository = "https://github.com/CNES/eolabtools"
documentation = "https://eolabtools.readthedocs.io"

[project.scripts]
night_osm_image_registration = "eolabtools.night_osm_registration.register_image:main"
Expand Down