Skip to content

Commit 7a6dea4

Browse files
committed
Add licence LGPL and copyright
1 parent 174d0b4 commit 7a6dea4

File tree

8 files changed

+761
-22
lines changed

8 files changed

+761
-22
lines changed

COPYING

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,11 @@ Example:
147147
conda activate arcgispro-eo
148148
python rusle.py -aoi emsn073_aoi_32631.shp -loc "Europe" -nir T31TDH_20200805T104031_B08_10m.jp2 -red T31TDH_20200805T104031_B04_10m.jp2 -del emsn073_del_32631.shp -o output
149149
```
150+
151+
# Licence
152+
153+
Copyright (c) 2024 SERTIT, All rights reserved.
154+
155+
Licensed under The GNU General Public License version 3 (GPLv3) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.gnu.org/licenses/gpl-3.0.html
156+
157+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

rusle.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
This file is part of RUSLE.
3+
4+
RUSLE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5+
6+
RUSLE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7+
8+
You should have received a copy of the GNU General Public License along with RUSLE. If not, see <https://www.gnu.org/licenses/>.
9+
"""
10+
111
from rusle.rusle_cli import compute_rusle
212

313
compute_rusle()

rusle/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""
2+
This file is part of RUSLE.
3+
4+
RUSLE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5+
6+
RUSLE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7+
8+
You should have received a copy of the GNU General Public License along with RUSLE. If not, see <https://www.gnu.org/licenses/>.
9+
"""

rusle/rusle_cli.py

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1+
"""
2+
This file is part of RUSLE.
3+
4+
RUSLE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5+
6+
RUSLE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7+
8+
You should have received a copy of the GNU General Public License along with RUSLE. If not, see <https://www.gnu.org/licenses/>.
9+
"""
10+
111
"""
212
The rusle CLI will fail if you called this file directly. Call the root file rusle.py.
313
"""
414

515
import sys
6-
try:
7-
import rich_click as click
8-
except:
9-
import click
16+
import rich_click as click
17+
1018

1119
@click.command()
1220
@click.option(
@@ -60,7 +68,7 @@
6068
"-fcp",
6169
"--fcover_path",
6270
help="Path to a Fraction of green Vegetation Coverportal (Fcover) raster file. "
63-
"If not provided, it will be calculated from nir and red bands or satellite products",
71+
"If not provided, it will be calculated from nir and red bands or satellite products",
6472
type=click.Path(exists=True, resolve_path=True),
6573
)
6674
@click.option(
@@ -74,7 +82,7 @@
7482
"-lsp",
7583
"--ls_path",
7684
help="Optional path to the Slope angle and length (LS factor) raster. "
77-
"If not provided, it is calculated thanks to the DEM.",
85+
"If not provided, it is calculated thanks to the DEM.",
7886
type=click.Path(exists=True, resolve_path=True),
7987
)
8088
@click.option(
@@ -124,22 +132,22 @@
124132
default=False,
125133
)
126134
def compute_rusle(
127-
aoi_path,
128-
location,
129-
nir_path,
130-
red_path,
131-
satellite_product,
132-
landcover_name,
133-
fcover_path,
134-
p03_path,
135-
del_path,
136-
ls_path,
137-
dem_name,
138-
other_dem_path,
139-
output_resolution,
140-
epsg_code,
141-
output,
142-
ftep,
135+
aoi_path,
136+
location,
137+
nir_path,
138+
red_path,
139+
satellite_product,
140+
landcover_name,
141+
fcover_path,
142+
p03_path,
143+
del_path,
144+
ls_path,
145+
dem_name,
146+
other_dem_path,
147+
output_resolution,
148+
epsg_code,
149+
output,
150+
ftep,
143151
):
144152
"""
145153
Import osm charter with the CLI.

rusle/rusle_core.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
This file is part of RUSLE.
3+
4+
RUSLE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5+
6+
RUSLE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7+
8+
You should have received a copy of the GNU General Public License along with RUSLE. If not, see <https://www.gnu.org/licenses/>.
9+
"""
10+
111
"""
212
Processing the Mean (annual) soil loss (in ton/ha/year) with the RUSLE model.
313

rusle/rusle_ftep.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
This file is part of RUSLE.
3+
4+
RUSLE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5+
6+
RUSLE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7+
8+
You should have received a copy of the GNU General Public License along with RUSLE. If not, see <https://www.gnu.org/licenses/>.
9+
"""
10+
111
import os
212

313
import ftep_util as ftep

rusle/sertit.pyt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
This file is part of RUSLE.
3+
4+
RUSLE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
5+
6+
RUSLE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
7+
8+
You should have received a copy of the GNU General Public License along with RUSLE. If not, see <https://www.gnu.org/licenses/>.
9+
"""
10+
111
import arcpy
212

313
class Toolbox(object):

0 commit comments

Comments
 (0)