diff --git a/grass-gis-addons/m.import.rvr/m.import.rvr.html b/grass-gis-addons/m.import.rvr/m.import.rvr.html
index 4726425..3e61414 100644
--- a/grass-gis-addons/m.import.rvr/m.import.rvr.html
+++ b/grass-gis-addons/m.import.rvr/m.import.rvr.html
@@ -1,7 +1,7 @@
DESCRIPTION
m.import.rvr imports data for the processing of buildings analysis,
-green roofs and/or trees analysis.
+green roofs, trees analysis and/or >neural network.
The module takes as options the paths to the input directories and files.
With the flag -c the module checks only if all required input options
@@ -35,12 +35,21 @@ DESCRIPTION
trees analysis
- True digital orthophotos (TOP): GTIFF files from given directory top_dir imported and resampled to 0.2 m
+ - Reference buildings: imported from given vector file reference_buildings_file or from openNRW if -b is set
- Digital surface model (DSM): LAZ files from given directory dsm_dir imported and resampled to 0.2 m
- Digital terrain model (DTM): from given raster file dtm_file, or tiles from a directory with XYZ files, or if not set from openNRW imported and resampled to 0.2 m
- Normalized Difference Vegetation Index (NDVI): calculated on the basis of TOP and scaled to 0 to 255
- Normalized Digital Surface Model (nDSM): calculated on the basis of DSM and DTM
+ neural network
+
+ - True digital orthophotos (TOP): GTIFF files from given directory top_dir imported and resampled to 0.2 m
+ - Digital surface model (DSM): LAZ files from given directory dsm_dir imported and resampled to 0.2 m
+ - Digital terrain model (DTM): from given raster file dtm_file, or tiles from a directory with XYZ files, or if not set from openNRW imported and resampled to 0.2 m
+ - Normalized Digital Surface Model (nDSM): calculated on the basis of DSM and DTM
+
+
REQUIREMENTS
@@ -102,6 +111,21 @@ Import data for trees analysis for Herne 2020
dtm_file=${DATAFOLDER}/DGM/2020_Herne_DGM10_100m_Puffer.tif
+Import data for neural network label traindata for Sonsbeck 2020
+
+
+CITY=Sonsbeck
+YEAR=2020
+BEFLIEGUNG="08-05"
+DATA_DIR="/media/mundialis_daten/projekte/rvr_grassgis-addon-wartung/Testdaten"
+CITY_DIR="${DATA_DIR}/${CITY}"
+m.import.rvr type="neural network" \
+ area=/media/mundialis_daten/projekte/rvr_grassgis-addon-wartung/Testdaten/Sonsbeck/study_area_4x4km_Sonsbeck.gpkg \
+ dtm_file="${CITY_DIR}/${YEAR}/${BEFLIEGUNG}/DGM1/TIFF_corrected/MOSAIC/DGM1_${CITY}_${YEAR}_corrected.tif" \
+ dsm_dir="${CITY_DIR}/${YEAR}/${BEFLIEGUNG}/2_5D" \
+ top_dir="${CITY_DIR}/${YEAR}/${BEFLIEGUNG}/TOP"
+
+
SEE ALSO
diff --git a/grass-gis-addons/m.import.rvr/m.import.rvr.py b/grass-gis-addons/m.import.rvr/m.import.rvr.py
index b2ab9d5..815bd44 100644
--- a/grass-gis-addons/m.import.rvr/m.import.rvr.py
+++ b/grass-gis-addons/m.import.rvr/m.import.rvr.py
@@ -18,13 +18,14 @@
#############################################################################
# %Module
-# % description: Import data for the processing of buildings analysis, green roofs detection and/or trees analysis.
+# % description: Import data for the processing of buildings analysis, green roofs detection, trees analysis and/or neural network.
# % keyword: raster
# % keyword: vector
# % keyword: import
# % keyword: trees analysis
# % keyword: buildings analysis
# % keyword: green roofs
+# % keyword: neural network
# %end
# %option
@@ -33,7 +34,7 @@
# % required: yes
# % multiple: yes
# % label: Type of processing for which the data should be imported
-# % options: buildings analysis,green roofs,trees analysis
+# % options: buildings analysis,green roofs,trees analysis,neural network
# % guisection: General input
# %end
@@ -48,7 +49,7 @@
# % key: dsm_dir
# % multiple: no
# % label: Directory where the digital surface model (DSM) is stored as laz files
-# % description: Required for the processing types buildings analysis, green roofs detection and trees analysis
+# % description: Required for the processing types buildings analysis, green roofs detection, trees analysis and neural network
# % guisection: General input
# %end
@@ -66,7 +67,7 @@
# % required: no
# % multiple: no
# % label: Directory where XYZ files of the digital terrain model (DTM) are stored (leave empty to automatically download DTM from Open.NRW)
-# % description: Required for the processing types buildings analysis, green roofs detection and trees analysis
+# % description: Required for the processing types buildings analysis, green roofs detection, trees analysis and neural network
# % guisection: General input
# %end
@@ -75,7 +76,7 @@
# % required: no
# % multiple: no
# % label: Raster file (e.g. TIF) of the digital terrain model (DTM) (leave empty to automatically download DTM from Open.NRW)
-# % description: Required for the processing types buildings analysis, green roofs detection and trees analysis
+# % description: Required for the processing types buildings analysis, green roofs detection, trees analysis and neural network
# % guisection: General input
# %end
@@ -166,7 +167,7 @@
# % required: no
# % multiple: no
# % label: Directory where the true digital orthophots (TOPs) are stored as GeoTiffs
-# % description: Required for the processing of trees analysis
+# % description: Required for the processing of trees analysis and neural network
# % guisection: Input trees analysis
# %end
@@ -284,6 +285,13 @@
"dtm": ([0.2], "ndsm", False, "dtm_file", "rasterORxyz"),
"ndsm": ([0.2], "output", True, "", "ndsm"),
},
+ "neural network": {
+ # raster
+ "top": ([0.2], "output,ndvi", True, "top_dir", "rasterdir"),
+ "dsm": ([0.2], "ndsm", True, "dsm_dir", "lazdir"),
+ "dtm": ([0.2], "ndsm", False, "dtm_file", "rasterORxyz"),
+ "ndsm": ([0.2], "output", True, "", "ndsm"),
+ },
}
@@ -592,8 +600,8 @@ def check_data(ptype, data, val):
"""Checks if all required data are set and the data files or folder
exists.
Args:
- ptype (str): processing type (buildings analysis, green roofs or
- trees analysis)
+ ptype (str): processing type (buildings analysis, green roofs,
+ trees analysis or neural network)
data (str): Name or type of the data
val (tuple): Tuple with values of the data: (resolution, purpose,
required, needed input information, import