Skip to content

Commit

Permalink
update: installation manual and project strutcture
Browse files Browse the repository at this point in the history
  • Loading branch information
ac-willeke committed Feb 28, 2024
1 parent 9ea2c0b commit dc34e63
Show file tree
Hide file tree
Showing 80 changed files with 4,832 additions and 479 deletions.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/methods/01_tree_detection/README.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/doctrees/methods/02_support_tools/README.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/doctrees/methods/02_support_tools/project_structure.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/doctrees/methods/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/methods/installation_manuals/index.doctree
Binary file not shown.
Binary file added docs/doctrees/methods/method_template.doctree
Binary file not shown.
Binary file added docs/html/_images/workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
Task 1 | Urban Tree Detection
=============================

*work in progress, move word docs to rst*

This is the documentation page related to the GitHub repository:
`urban-tree-detection <https://github.com/NINAnor/urban-tree-detection>`_

Expand Down Expand Up @@ -42,12 +40,11 @@ Installation
------------
.. toctree::
:maxdepth: 1

../05_installation_manuals/01_tree_detection_installation
:caption: View the installation manual and project structure for instructions.

installation_manual
project_structure



Data
----

Expand All @@ -56,8 +53,8 @@ Data



Workflow
----------
Methods
-------
1. **Create a study area mask** (*optional manual action*)

We recommend to create a study area mask manually, as it is specific to each municipality
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Urban Tree Detection Installation Manual
# Installation Manual | *urban-tree-detection*

## Environment Setup and Configuration
**GitHub Repository**: [urban-tree-detection](https://github.com/NINAnor/urban-tree-detection)

### Installation
## Installation

The code runs in an ArcGIS Pro 3.1.0. conda environment and depends on 3D analyst, image analyst, spatial analyst licenses.

Expand Down Expand Up @@ -32,7 +32,7 @@ Here are the steps to create a conda env compatible with ArcGIS Pro 3.0.1 and to
# verify name is deleted from list
conda info --envs

4. Install linters using pipx
4. (Optional) Install linters using pipx
```bash
# install linters using make
make install-global
Expand All @@ -42,7 +42,7 @@ Here are the steps to create a conda env compatible with ArcGIS Pro 3.0.1 and to

**note:** As `pre-commit` unfortunately gives acces-denied errors on Windows OS, I would recommend to run `make codestyle` command before you commit your changes. This command runs black, isort and ruff on all files.

### Configuration
## Configuration
This project uses a .env and a config.yaml file to store configuration variables. The module `utils.config.py` and `yaml_utils.py` provides functions to read and write these files.

Run `src/test/test_config.py` to test the configuration and logger.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@

# Project Structure
# Project Structure | *urban-tree-detection*

**GitHub Repository**: [urban-tree-detection](https://github.com/NINAnor/urban-tree-detection)

## Project folder structure

**TODO** CHECK AND UPDATE PROJECT FOLDER STRUCTURE

```bash
C:\path\to\project\folder
├── .gitignore
Expand Down
44 changes: 44 additions & 0 deletions docs/html/_sources/methods/02_support_tools/README.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
==============================
Task X | Title
==============================

This repository provides a workflow for ...

Code is provided for the following tasks:

1. **Tekst here :** ...

2. **Tekst here:** ...

The repository is applied on the Norwegian municipalities: *Bærum, Bodø, Kristiansand* and *Oslo.*


Installation
------------
.. toctree::
:maxdepth: 1
:caption: View the installation manual and project structure for instructions.

installation_manual
project_structure



Data
----


Methods
-------


**References**

- ref here
- ref here

**Contributors**

- Willeke A'Campo (NINA), [email protected]


Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Task 2 | Integration of Municipal Tree Data and ALS Data
# Task 2 | Integration of Municipal Tree points and Laser-detected Tree Crown polygons

This repository provides a workflow for preparing municipal tree data for i-Tree Eco analysis and extrapolating the results to full the study area extent, using lidar-segmented tree crowns and auxiliary GIS datasets.
This repository provides a workflow for preparing municipal tree data for i-Tree Eco analysis and extrapolating the results to full the study area extent, using the lidar-segmented tree crowns and auxiliary GIS datasets.

------------

Code is provided for the following tasks:

1. **i-Tree Eco Data Preparation:** preparing an input dataset for i-Tree Eco analysis by supplementing existing municipal tree inventories with crown geometry from the ALS data and auxiliary spatial datasets following the workflow by *Cimburova and Barton (2020).*

2. **i-Tree Eco Extrapolation:** extrapolating the outputs from i-Tree Eco analysis to all trees in the study area following the workflow by Cimburova and Barton (2020).
2. **i-Tree Eco Extrapolation:** extrapolating the outputs from i-Tree Eco analysis to all trees in the study area.

The repository is applied on the Norwegian municipalities: *Bærum, Bodø, Kristiansand* and *Oslo.*

Expand All @@ -17,49 +17,7 @@ The repository is applied on the Norwegian municipalities: *Bærum, Bodø, Krist



## Project Installation and Configuration

The code is build in an ArcGIS Pro 3.1.0. conda environment with the spatial analyst license enabled.

1. Clone the repository.
3. Open [Project structure](docs/project_structure.md) to view the structure of the project.
4. Set up your Python Environment:

a. Create a new conda environment using the `environment.yml` file or clone the arcgispro-py3 environment from your ArcGIS Pro installation and install the required packages listed in the `requirements.txt` file.
```bash
cd path/to/project/folder
conda env create -f environment.yml
conda activate project-name
```

b. (Optional) Install linters using pipx
```bash
# install linters using pipx
make install-global
# test linters
make codestyle
```

**note:** As `pre-commit` unfortunately often gives acces-denied errors on Windows OS, I would recommend to run `make codestyle` command before you commit your changes. This command runs black, isort and ruff on all files using the configuration specified in the [pyproject.toml](pyproject.toml) file.

c. Install as a local package
```bash
pip install .
pip install -e . # for development
```
- installs project packages in development mode
- creates a folder **package-name.egg-info**

d. Configure your project.

- Copy template.env to $user/.env and fill in the variables.
*ENSURE THAT YOU DO NOT COMMIT .ENV TO THE REPOSITORY*
- check that your data is located in the correct folders, look at the [Project structure](docs/project_structure.md) and the [Catalog](config/catalog.yaml) for more details.

e. Define your municipality in the [parameters](config/parameters.yaml) file.

d. Run `config.py` in the conda env to test your project config.
-------

## Workflow | i-Tree Eco Data Preparation

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Installation Manual | *itree-support-tools*

**GitHub Repository**: [itree-support-tools](https://github.com/NINAnor/itree-support-tools)

## Installation

The code is build in an ArcGIS Pro 3.1.0. conda environment with the spatial analyst license enabled.

1. Clone the repository.
3. Open [Project structure](project_structure.md) to view the structure of the project.
4. Set up your Python Environment:

a. Create a new conda environment using the `environment.yml` file or clone the arcgispro-py3 environment from your ArcGIS Pro installation and install the required packages listed in the `requirements.txt` file.
```bash
cd path/to/project/folder
conda env create -f environment.yml
conda activate project-name
```

b. (Optional) Install linters using pipx
```bash
# install linters using pipx
make install-global
# test linters
make codestyle
```

**note:** As `pre-commit` unfortunately often gives acces-denied errors on Windows OS, I would recommend to run `make codestyle` command before you commit your changes. This command runs black, isort and ruff on all files using the configuration specified in the [pyproject.toml](pyproject.toml) file.

c. Install as a local package
```bash
pip install .
pip install -e . # for development
```
- installs project packages in development mode
- creates a folder **package-name.egg-info**

## Configuration

1. Copy template.env to $user/.env and fill in the variables.
*ENSURE THAT YOU DO NOT COMMIT .ENV TO THE REPOSITORY*

2. Check that your data is located in the correct folders, look at the [Project structure](docs/project_structure.md) and the [Catalog](config/catalog.yaml) for more details.

3. Define your municipality in the [parameters](config/parameters.yaml) file.

4. Run `config.py` in the conda env to test your project config.
-------
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

# Project Structure
# Project Structure | *itree-support-tools*

**GitHub Repository**: [itree-support-tools](https://github.com/NINAnor/itree-support-tools)

## Project folder structure

**TODO** CHECK AND UPDATE PROJECT FOLDER STRUCTURE

```bash
C:\path\to\project\folder
Expand Down Expand Up @@ -55,4 +61,22 @@ The following files are included in this template:
- [utils.py](src/utils.py) project utility methods.
- [decorators.py](src/decorators.py) project decorators.

-------
-------


## Data folder structure
Data is organized by municipality and has a similar sub-folder structure for each municipality. The data folder contains the following sub-folders:

```shell
path/to/urban-tree-detection/
├── data
│ ├── bodo
│   │   ├── interim <- Intermediate data that has been transformed.
│   │   ├── processed <- The final, canonical data sets for modeling.
│   │   └── raw <- The original, immutable data dump.
│ ├── baerum
│ ├── kristiansand
│ └── oslo
├── ...
└── ...
```
Loading

0 comments on commit dc34e63

Please sign in to comment.