diff --git a/source/usr_section/application_tutorials/spectral_library/img/exported_envi_files.png b/source/usr_section/application_tutorials/spectral_library/img/exported_envi_files.png deleted file mode 100644 index c1279689..00000000 Binary files a/source/usr_section/application_tutorials/spectral_library/img/exported_envi_files.png and /dev/null differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_col.gif b/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_col.gif deleted file mode 100644 index 9cd5e65e..00000000 Binary files a/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_col.gif and /dev/null differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_prof.gif b/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_prof.gif deleted file mode 100644 index ad12cb83..00000000 Binary files a/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_prof.gif and /dev/null differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_sampling.gif b/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_sampling.gif deleted file mode 100644 index 1096cf03..00000000 Binary files a/source/usr_section/application_tutorials/spectral_library/img/spec_prof_pan_sampling.gif and /dev/null differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.1.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.1.png new file mode 100644 index 00000000..4dc2b73d Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.1.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.2.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.2.gif new file mode 100644 index 00000000..9e57fec9 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.2.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.3.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.3.gif new file mode 100644 index 00000000..758ffa09 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.3.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.4.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.4.png new file mode 100644 index 00000000..e68c506e Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.4.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.5.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.5.gif new file mode 100644 index 00000000..2436bb5e Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.1.5.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.1.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.1.gif new file mode 100644 index 00000000..fd6d2fc1 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.1.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.10.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.10.png new file mode 100644 index 00000000..319acf8b Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.10.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.2.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.2.gif new file mode 100644 index 00000000..b95fcaa4 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.2.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.3.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.3.gif new file mode 100644 index 00000000..ee74c5e9 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.3.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.4.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.4.gif new file mode 100644 index 00000000..c3152ca6 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.4.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.5.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.5.gif new file mode 100644 index 00000000..d60db451 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.5.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.6.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.6.png new file mode 100644 index 00000000..67643e03 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.6.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.7.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.7.gif new file mode 100644 index 00000000..9f10a30d Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.7.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.8.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.8.gif new file mode 100644 index 00000000..8e4c8eee Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.8.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.9.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.9.png new file mode 100644 index 00000000..ae8d7b3b Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.2.9.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.1.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.1.gif new file mode 100644 index 00000000..9d427754 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.1.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.3.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.3.gif new file mode 100644 index 00000000..73a5e1d4 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.3.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.4.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.4.gif new file mode 100644 index 00000000..6f1bce4b Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.4.4.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.1.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.1.png new file mode 100644 index 00000000..88bea6f6 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.1.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.2.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.2.gif new file mode 100644 index 00000000..56ec5e52 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.2.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.3.gif b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.3.gif new file mode 100644 index 00000000..8f278346 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_6.5.3.gif differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_ecosis.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_ecosis.png new file mode 100644 index 00000000..e9103c46 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_ecosis.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_envi.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_envi.png new file mode 100644 index 00000000..8fd3c502 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_envi.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_profilesourceExpression_Builder.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_profilesourceExpression_Builder.png new file mode 100644 index 00000000..da3daa77 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_profilesourceExpression_Builder.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_sampling.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_sampling.png new file mode 100644 index 00000000..f802adeb Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_sampling.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_source.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_source.png new file mode 100644 index 00000000..d8f4fa23 Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_source.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/img/speclib_style.png b/source/usr_section/application_tutorials/spectral_library/img/speclib_style.png new file mode 100644 index 00000000..acc6981a Binary files /dev/null and b/source/usr_section/application_tutorials/spectral_library/img/speclib_style.png differ diff --git a/source/usr_section/application_tutorials/spectral_library/spectral_library_tut.rst b/source/usr_section/application_tutorials/spectral_library/spectral_library_tut.rst index 9ce240d2..47a00d13 100644 --- a/source/usr_section/application_tutorials/spectral_library/spectral_library_tut.rst +++ b/source/usr_section/application_tutorials/spectral_library/spectral_library_tut.rst @@ -16,7 +16,7 @@ Start the EnMAP-Box * Launch QGIS and click the |enmapbox| icon in the toolbar to open the EnMAP-Box. The EnMAP-Box GUI comprises a **Menu** and a **Toolbar**, panels for **Data Sources** and **Data Views**, and the **QGIS Processing Toolbox**, which includes the **EnMAP-Box Processing Algorithms**. - .. figure:: img/01_enmapbox_surface.png + .. figure:: img/speclib_6.1.1.png The EnMAP-Box main GUI. @@ -31,7 +31,7 @@ For this introduction the Example Data of the EnMAP-Box will be used. to download the data. * After clicking **yes** the example data will be saved into the plugin installation folder. - .. figure:: img/02_add_expldt.gif + .. figure:: img/speclib_6.1.2.gif Loading the EnMAP-Box example data. @@ -48,7 +48,7 @@ backend for a spectral library. * Open the spectral library :file:`EnMAP Spectral Response Function (224 Bands)` from the Example Data, using drag and drop: - .. figure:: img/03_load_spec_lib.gif + .. figure:: img/speclib_6.1.3.gif Opening a spectral library with EnMAP spectral response functions. @@ -60,7 +60,7 @@ Basic Visualization Steps * The spectral library viewer should look like this: - .. figure:: img/04_spec_lib_window_explained.png + .. figure:: img/speclib_6.1.4.png Overview Spectral Library Viewer. @@ -85,7 +85,7 @@ Basic Visualization Steps * These are the tools you already know from the QGIS attribute table (`here is a link to the website `_) * Some functions of the toolbar are shown below. There are multiple possibilities, to organize and edit the different profiles in the **Attribute Table**: - .. figure:: img/07_functions_speclib_toolbar.gif + .. figure:: img/speclib_6.1.5.gif Selecting spectral profiles from attribute table. @@ -115,7 +115,7 @@ Let's open a spectral library that provides coordinates for each spectral profil * Use the context menu **Open Spectral Library Viewer** to visualize the spectral profiles. * Use the **Map View** context menu to add the speclib_potsdam vector layer - .. figure:: img/load_speclib_potsdam_with_map.gif + .. figure:: img/speclib_6.2.1.gif Opening the speclib_potsdam.gpkg library in a Spectral Library View and a Map View. @@ -143,7 +143,7 @@ In this introduction we like to collect additional profiles for the following cl * In order to collect profiles from the EnMAP image only, select :file:`enmap_potsdam` as profile source . - .. figure:: img/spec_prof_to_enmap.gif + .. figure:: img/speclib_6.2.2.gif Collecting spectral profiles from an EnMAP image. @@ -152,15 +152,15 @@ In this introduction we like to collect additional profiles for the following cl * To see the EnMAP pixel size underneath, open the Map View context menu, then click on **Crosshair**, **Pixel Grid** and select :file:`enmap_potsdam`. - .. figure:: img/crosshair.gif + .. figure:: img/speclib_6.2.3.gif Showing underneath pixel borders. -* So far, collected profiles are stored temporarily only. We can call them *profile candidates*. By clicking on |plus_green_icon| you can add them to the spectral library. +* When you select a location, a profile candidate is added to the spectral library vector layer. However, this entry is temporary. If you select a new location without clicking the Add button |plus_green_icon|, the current candidate will be automatically deleted and replaced by the new selection. To permanently keep a profile in the library, you must click |plus_green_icon|. * With |profile_add_auto| the new spectral profiles candidates are added automatically. - .. figure:: img/add_profiles_automatically.gif + .. figure:: img/speclib_6.2.4.gif Automatic profile collection. @@ -173,7 +173,7 @@ In this introduction we like to collect additional profiles for the following cl * For a clearer organization you can add columns |mActionNewAttribute| to add information. Insert a column name and select a type (e.g. integer or string). - .. figure:: img/add_profiles.gif + .. figure:: img/speclib_6.2.5.gif Collecting and describing spectral profiles from image data. @@ -184,7 +184,7 @@ Spectral Profile Source Panel * If you select |select_location| and |profile| without having a Spectral Library View opened, the **Spectral Profiles Source** panel will open one automatically when you click on a pixel in the map for the first time. * To open the **Spectral Profiles Source** panel manually, click on **View** in the menu, select **Panels**, and then choose **Spectral Profiles Source**. - .. figure:: img/spec_profiles_source_panel.png + .. figure:: img/speclib_6.2.6.png The Spectral Profile Source panel (right) specifies how profiles are collected, described and displayed when overlaid in a linked Spectral Library View. @@ -193,16 +193,16 @@ Spectral Profile Source Panel First, let's focus on the definition of how spectral profiles are collected: - .. image:: img/spec_prof_pan_prof.gif + .. image:: img/speclib_source.png * **Profiles** specifies how the profiles are stored in the Profiles field in the spectral library attribute table. * You can specify the raster source from which the profile is sampled. Choose :file:`enmap_potsdam`. - .. image:: img/spec_prof_pan_col.gif + .. image:: img/speclib_style.png * **Style** lets you specify how the sampled profiles are displayed when overlaid in the Spectral Library view. - .. image:: img/spec_prof_pan_sampling.gif + .. image:: img/speclib_sampling.png * **Sampling** can be used to define how the profiles are sampled around the mouse coordinate. @@ -216,26 +216,26 @@ We like to generate a profile name automatically. * With the **Expression Builder** you can create expressions that dynamically generate attributes. * Write ``'' + format('Px %1,%2', @px_x, @px_y)`` to generate a string that includes the pixel position, as in ``Px 23, 24``. - .. image:: img/Expression_Builder.png + .. image:: img/speclib_profilesourceExpression_Builder.png Changing Profile Styles ======================= -The *profile visualization settings* allow you to change profile color, line- and symbole styles. +The *profile visualization settings* allow you to change profile color, line and symbol styles. -* by default, *profiles in the spectral library* use the ``@symbol_color`` that is used in the map visualization. +* By default, *profiles in the spectral library* use the ``@symbol_color`` that is used in the map visualization. * In that case you can use the layer legend to show or hide groups of profiles. Changing the layer rendering in the map will change the profile colors too. * You can define your own colors and even use the expression builder to generate colors based profile attributes -* *temporarily profile candidates* use the style that is defined in the *Spectra Profile Source Panel*. +* *Temporarily profile candidates* use the style that is defined in the *Spectra Profile Source Panel*. - .. figure:: img/profile_vis_speclib_legend.gif + .. figure:: img/speclib_6.2.7.gif Profile visualization * Go to the **Layer Properties** of your spectral library in the **Data Views** panel. With **Symbology** you can set the colors. - .. figure:: img/colors_symbology.gif + .. figure:: img/speclib_6.2.8.gif The vector layer symbology panel defines the feature symbols... @@ -243,7 +243,7 @@ The *profile visualization settings* allow you to change profile color, line- an * You can change the colors by double-clicking on the color you want to change. * Click **OK**. Now your spectra have different colors and your graph is more clear. - .. figure:: img/graph_col.png + .. figure:: img/speclib_6.2.9.png ... whose colors can be used as profile color. @@ -251,9 +251,9 @@ The *profile visualization settings* allow you to change profile color, line- an This way you can differentiate profiles by other means than the vector layer map symbology. * Create a group for *vegetation* that uses the filter expression `"name" = 'vegetation'`. Double click on entries in the *Value* column to edit the visualization name or define filter expressions. * Create a group for *Other* profiles with filter expression `"name" != 'vegetation'` -* Style both groups differently, e.g. by showing none-vegetation in dotted lines +* Style both groups differently, e.g. by showing non-vegetation in dotted lines - .. figure:: img/profile_vis_groups.png + .. figure:: img/speclib_6.2.10.png Using multiple visualization groups allows for fine-tuned profiles styles @@ -299,18 +299,11 @@ Geopackage we can add spectral profiles to. * Click on |speclib_add| to open the **Import Spectral Profiles** window. - .. figure:: img/import_a_speclib.gif + .. figure:: img/speclib_6.4.1.gif The dialog to import spectral profiles into a spectral library. * Choose **Geopackage** and set the path to the downloaded ``speclib_potsdam.gpkg`` filename. -* The *Field Value Import* table specifies which attribute we like to import into our speclib. -* Use the *Copy missing source fields* dialog to create a new *notes* field in our in-memory speclib - - .. figure:: img/import_gpkg.png - - Import of profiles from a GeoPackage library. - * Click **OK** @@ -327,7 +320,7 @@ ASD Field Spectrometer * Click **OK** * Select some of the new imported features in the attribute table and zoom to. - .. figure:: img/import_asd_files.gif + .. figure:: img/speclib_6.4.3.gif Importing spectral profiles (White Reference + Target) from an ASD Field Spectrometer into an empty Spectral Library. @@ -349,7 +342,7 @@ Raster Layer * To import the columns of your choice, click on |mSourceFields| and select the columns. * Click **OK** - .. figure:: img/import_rasterprofiles.gif + .. figure:: img/speclib_6.4.4.gif Importing spectral profiles from a raster layer and a vector layer that specifies the profile locations. @@ -405,7 +398,7 @@ GeoPackage / GeoJSON * Click on the |speclib_save| symbol. The **Export Spectral Library** window will open. - .. figure:: img/08_export_speclib_gpkg.png + .. figure:: img/speclib_6.5.1.png Dialog to export spectral profiles into a new GeoPackage file. @@ -419,23 +412,36 @@ GeoPackage / GeoJSON ENVI Spectral Library ===================== -* Now export the spectral library |speclib_save| a *ENVI Spectral Library* ``*.sli``. +* Now export the spectral library |speclib_save| as a *ENVI Spectral Library* ``*.sli``. Choose a field from which to export the profiles and a field that contains the profile names. - .. figure:: img/exported_gpkg_qml.png + .. figure:: img/speclib_6.5.2.gif - Dialog to export spectral profiles as ENVI Spectral Library. + Export spectral profiles as ENVI Spectral Library. * The new ENVI Spectral Library (``*.sli``) is accompanied by a ``.csv`` file that lists additional values from, like the point coordinates in WKT notation. - .. image:: img/exported_envi_files.png + .. image:: img/speclib_envi.png .. note:: Our spectral library could contain profiles from different sensors in the same field, but the ENVI spectral library format does not allow to save profiles with a differing number of bands. In that case the EnMAP-Box will create multiple ``*.sli`` file, one for each set of profiles that are similar in the number of bands and wavelengths. +EcoSIS Spectral Library +======================= + +* Now export the spectral library |speclib_save| as a *EcoSIS Spectral Library* ``*.csv``. + Choose a field from which to export the profiles and for names you can choose the field that contains names or you can also use a profile name expression to generate names. + + + .. figure:: img/speclib_6.5.3.gif + + Export spectral profiles as EcoSIS Spectral Library. + + .. image:: img/speclib_ecosis.png + .. AUTOGENERATED SUBSTITUTIONS - DO NOT EDIT PAST THIS LINE diff --git a/source/usr_section/usr_manual/img/speclibs/speclib_field_calculator_reflectance.gif b/source/usr_section/usr_manual/img/speclibs/speclib_field_calculator_reflectance.gif new file mode 100644 index 00000000..9d29b850 Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/speclib_field_calculator_reflectance.gif differ diff --git a/source/usr_section/usr_manual/img/speclibs/speclib_fieldcalculator_spectralmath.png b/source/usr_section/usr_manual/img/speclibs/speclib_fieldcalculator_spectralmath.png new file mode 100644 index 00000000..88d52ded Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/speclib_fieldcalculator_spectralmath.png differ diff --git a/source/usr_section/usr_manual/img/speclibs/speclib_resampling_landsat.gif b/source/usr_section/usr_manual/img/speclibs/speclib_resampling_landsat.gif new file mode 100644 index 00000000..a411b830 Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/speclib_resampling_landsat.gif differ diff --git a/source/usr_section/usr_manual/img/speclibs/speclib_table_formview.gif b/source/usr_section/usr_manual/img/speclibs/speclib_table_formview.gif new file mode 100644 index 00000000..688f22f1 Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/speclib_table_formview.gif differ diff --git a/source/usr_section/usr_manual/img/speclibs/speclib_table_formview_editvalues.gif b/source/usr_section/usr_manual/img/speclibs/speclib_table_formview_editvalues.gif new file mode 100644 index 00000000..0d95f354 Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/speclib_table_formview_editvalues.gif differ diff --git a/source/usr_section/usr_manual/img/speclibs/spectral_processing_button.png b/source/usr_section/usr_manual/img/speclibs/spectral_processing_button.png new file mode 100644 index 00000000..e11c62ac Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/spectral_processing_button.png differ diff --git a/source/usr_section/usr_manual/img/speclibs/spectral_processing_dialog.png b/source/usr_section/usr_manual/img/speclibs/spectral_processing_dialog.png new file mode 100644 index 00000000..ee1237ef Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/spectral_processing_dialog.png differ diff --git a/source/usr_section/usr_manual/img/speclibs/spectral_processing_workflow.png b/source/usr_section/usr_manual/img/speclibs/spectral_processing_workflow.png new file mode 100644 index 00000000..3e671d79 Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/spectral_processing_workflow.png differ diff --git a/source/usr_section/usr_manual/img/speclibs/spectral_sampling_sentinel.png b/source/usr_section/usr_manual/img/speclibs/spectral_sampling_sentinel.png new file mode 100644 index 00000000..2529a7ca Binary files /dev/null and b/source/usr_section/usr_manual/img/speclibs/spectral_sampling_sentinel.png differ diff --git a/source/usr_section/usr_manual/processing_algorithms/analysis_ready_data/tile_enmap_l2a_product.rst b/source/usr_section/usr_manual/processing_algorithms/analysis_ready_data/tile_enmap_l2a_product.rst index 3ef653fe..1214ed4d 100644 --- a/source/usr_section/usr_manual/processing_algorithms/analysis_ready_data/tile_enmap_l2a_product.rst +++ b/source/usr_section/usr_manual/processing_algorithms/analysis_ready_data/tile_enmap_l2a_product.rst @@ -46,7 +46,7 @@ Tile EnMAP L2A product into given tiling scheme. :guilabel:`Detector overlap region` [enum] Different options for handling the detector overlap region from 900 to 1000 nanometers. For the Moving average filter, a kernel size of 3 is used. - Default: *4* + Default: *3* :guilabel:`Output basename` [string] `Output `_ basename. If not specified, the original basename is used. @@ -106,14 +106,13 @@ Tile EnMAP L2A product into given tiling scheme. - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression detectorOverlap: Detector overlap region - Default value: 4 + Default value: 3 Argument type: enum Available values: - 0: Order by detector (VNIR, SWIR) - 1: Order by wavelength (default order) - - 2: Moving average filter - - 3: VNIR only - - 4: SWIR only + - 2: VNIR only + - 3: SWIR only Acceptable values: - Number of selected option, e.g. '1' - Comma separated list of options, e.g. '1,3' diff --git a/source/usr_section/usr_manual/processing_algorithms/import_data/import_enmap_l2a_product.rst b/source/usr_section/usr_manual/processing_algorithms/import_data/import_enmap_l2a_product.rst index f009d62d..1978ca5d 100644 --- a/source/usr_section/usr_manual/processing_algorithms/import_data/import_enmap_l2a_product.rst +++ b/source/usr_section/usr_manual/processing_algorithms/import_data/import_enmap_l2a_product.rst @@ -35,21 +35,17 @@ Usage: **Parameters** -:guilabel:`Metadata file` [file] - The metadata XML file associated with the product. +:guilabel:`Metadata file or ZIP file` [file] + The metadata XML file or the ZIP file associated with the product. Instead of executing this algorithm, you may drag&drop the metadata XML file directly from your system file browser a\) onto the EnMAP-Box map view area, or b\) onto the Sensor Product Import panel. -:guilabel:`Set bad bands` [boolean] - Whether to mark no data `bands `_ as `bad bands `_. - Default: *True* - -:guilabel:`Exclude bad bands` [boolean] - Whether to exclude `bands `_. +:guilabel:`Exclude no data bands` [boolean] + Whether to exclude no data `bands `_. Default: *True* :guilabel:`Detector overlap region` [enum] Different options for handling the detector overlap region from 900 to 1000 nanometers. For the Moving average filter, a kernel size of 3 is used. - Default: *4* + Default: *3* **Outputs** @@ -70,19 +66,11 @@ Usage: Arguments ---------------- - file: Metadata file + file: Metadata file or ZIP file Argument type: file Acceptable values: - Path to a file - setBadBands: Set bad bands (optional) - Default value: true - Argument type: boolean - Acceptable values: - - 1 for true/yes - - 0 for false/no - - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression - excludeBadBands: Exclude bad bands (optional) + excludeNoDataBands: Exclude no data bands (optional) Default value: true Argument type: boolean Acceptable values: @@ -91,14 +79,13 @@ Usage: - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression detectorOverlap: Detector overlap region - Default value: 4 + Default value: 3 Argument type: enum Available values: - 0: Order by detector (VNIR, SWIR) - 1: Order by wavelength (default order) - - 2: Moving average filter - - 3: VNIR only - - 4: SWIR only + - 2: VNIR only + - 3: SWIR only Acceptable values: - Number of selected option, e.g. '1' - Comma separated list of options, e.g. '1,3' diff --git a/source/usr_section/usr_manual/processing_algorithms/import_data/import_sentinel_2_l2a_product.rst b/source/usr_section/usr_manual/processing_algorithms/import_data/import_sentinel_2_l2a_product.rst index 980e17fb..b072e405 100644 --- a/source/usr_section/usr_manual/processing_algorithms/import_data/import_sentinel_2_l2a_product.rst +++ b/source/usr_section/usr_manual/processing_algorithms/import_data/import_sentinel_2_l2a_product.rst @@ -14,7 +14,7 @@ Import Sentinel-2 L2A product .. ## AUTOGENERATED DESCRIPTION START -Prepare a `spectral raster layer `_ from the given product. `Wavelength `_ information is set and data is scaled into the 0 to 10000 range. +Prepare a `spectral raster layer `_ from the given product. `Wavelength `_ information is set and data is scaled into the 0 to 1 range. .. ## AUTOGENERATED DESCRIPTION END @@ -35,8 +35,8 @@ Usage: **Parameters** -:guilabel:`Metadata file` [file] - The MTD_MSIL2A.xml metadata file associated with the product. +:guilabel:`Metadata file or ZIP file` [file] + The MTD_MSIL2A.xml metadata file or the ZIP file associated with the product. Instead of executing this algorithm, you may drag&drop the metadata file directly from your system file browser a\) onto the EnMAP-Box map view area, or b\) onto the Sensor Product Import panel. :guilabel:`Band list` [enum] @@ -62,7 +62,7 @@ Usage: Arguments ---------------- - file: Metadata file + file: Metadata file or ZIP file Argument type: file Acceptable values: - Path to a file diff --git a/source/usr_section/usr_manual/processing_algorithms/import_data/import_usgs_spectral_library_version_7.rst b/source/usr_section/usr_manual/processing_algorithms/import_data/import_usgs_spectral_library_version_7.rst index 0cbcbaae..42845284 100644 --- a/source/usr_section/usr_manual/processing_algorithms/import_data/import_usgs_spectral_library_version_7.rst +++ b/source/usr_section/usr_manual/processing_algorithms/import_data/import_usgs_spectral_library_version_7.rst @@ -34,6 +34,9 @@ As a prerequisite, download `usgs_splib07.zip `_ characteristic. + **Outputs** :guilabel:`Output spectral library` [fileDestination] @@ -74,12 +77,47 @@ As a prerequisite, download `usgs_splib07.zip `_ with `spectral profiles `_ .. ## AUTOGENERATED PARAMETERS END @@ -51,7 +52,8 @@ Extract spectral profiles from raster layer Argument type: vector Acceptable values: - Path to a vector layer - OUTPUT: Output vector layer with spectral profiles + OUTPUT: Spectral Library + Output vector layer with spectral profiles Argument type: vectorDestination Acceptable values: - Path for new vector layer @@ -61,7 +63,7 @@ Extract spectral profiles from raster layer ---------------- OUTPUT: - Output vector layer with spectral profiles + Spectral Library .. ## AUTOGENERATED COMMAND USAGE END diff --git a/source/usr_section/usr_manual/processing_algorithms/spectral_library/import_spectral_profiles.rst b/source/usr_section/usr_manual/processing_algorithms/spectral_library/import_spectral_profiles.rst index b62e36e0..c991763b 100644 --- a/source/usr_section/usr_manual/processing_algorithms/spectral_library/import_spectral_profiles.rst +++ b/source/usr_section/usr_manual/processing_algorithms/spectral_library/import_spectral_profiles.rst @@ -22,56 +22,38 @@ Import spectral profiles **Parameters** :guilabel:`Input Sources` [multilayer] - -.. raw:: html - - Files or folders to read spectral profiles from + Files or folders to read `spectral profiles `_ from :guilabel:`Input file type` [enum] - -.. raw:: html - - Define the reader for the input files: - + Define the reader for the input files: + \ + \\All\: Try to find the input format automatically. May be slow.\ + \\ASD\: Malvern Panalytical ASD Spectrometer \(`https://www.malvernpanalytical.com/en/products/product-range/asd-range `_\)\ + \\EcoSIS\: Ecological Spectral Information System \(`https://ecosis.org/ `_\)\ + \\ENVI\: ENVI Spectral Library \(`https://www.nv5geospatialsoftware.com/docs/enviheaderfiles.html#HeaderFields> `_\)\ + \\GeoJSON\: GeoJSON\ + \\GeoPackage\: GeoPackage\ + \\SED\: Spectral Evolution \(`https://spectralevolution.com `_\)\ + \\SVC\: SVC\ + \\ECOSTRESS\: NASA JPL ECOSTRESS Spectral Library \(`https://speclib.jpl.nasa.gov/library `_\)\ + \ Default: *All* :guilabel:`Recursive search` [boolean] - -.. raw:: html - - Search recursively in sub-folders + Search recursively in sub-folders Default: *False* :guilabel:`Relative paths` [boolean] - -.. raw:: html - - Write filepaths relative to output spectral library. + Write filepaths relative to output `spectral library `_. Default: *False* :guilabel:`Date-time format code` [string] - -.. raw:: html - - Allows to set the date-time format code to read localized / none-ISO time stamps. For example, "%d.%m.%Y %H:%M:%S" to read "27.05.2025 09:39:32".
See https://docs.python.org/3/library/datetime.html#format-codes for details. + Allows to set the date-time format code to read localized / none-ISO time stamps.For example, "%d.%m.%`Y `_ %H:%M:%S" to read "27.05.2025 09:39:32". \See `https://docs.python.org/3/library/datetime.html#format-codes `_ for details. **Outputs** :guilabel:`Spectral library` [sink] - -.. raw:: html - - Vector layer with one or more fields that contain spectral profiles + `Vector layer `_ with one or more `fields `_ that contain `spectral profiles `_ Default: *TEMPORARY_OUTPUT* .. diff --git a/source/usr_section/usr_manual/processing_algorithms/spectral_library/import_spectral_profiles_into_a_vector_layer.rst b/source/usr_section/usr_manual/processing_algorithms/spectral_library/import_spectral_profiles_into_a_vector_layer.rst deleted file mode 100644 index f0c155e7..00000000 --- a/source/usr_section/usr_manual/processing_algorithms/spectral_library/import_spectral_profiles_into_a_vector_layer.rst +++ /dev/null @@ -1,85 +0,0 @@ - -.. - ## AUTOGENERATED TITLE START - -.. _alg-enmapbox-importspectralprofiles: - -******************************************** -Import Spectral Profiles into a vector layer -******************************************** - -.. - ## AUTOGENERATED TITLE END - -.. - ## AUTOGENERATED DESCRIPTION START - -.. - ## AUTOGENERATED DESCRIPTION END - -.. - ## AUTOGENERATED PARAMETERS START - -**Parameters** - -:guilabel:`Files to read spectral profiles from` [multilayer] - -:guilabel:`Recursive search for profile files` [boolean] - - Default: *False* - -:guilabel:`Write pathes relative to spectral library` [boolean] - - Default: *False* - -**Outputs** - -:guilabel:`Spectral library` [sink] - -.. - ## AUTOGENERATED PARAMETERS END - -.. - ## AUTOGENERATED COMMAND USAGE START - -**Command-line usage** - -``>qgis_process help enmapbox:importspectralprofiles``:: - - ---------------- - Arguments - ---------------- - - INPUT: Files to read spectral profiles from - Argument type: multilayer - RECURSIVE: Recursive search for profile files (optional) - Default value: false - Argument type: boolean - Acceptable values: - - 1 for true/yes - - 0 for false/no - - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression - RELPATH: Write pathes relative to spectral library (optional) - Default value: false - Argument type: boolean - Acceptable values: - - 1 for true/yes - - 0 for false/no - - field:FIELD_NAME to use a data defined value taken from the FIELD_NAME field - - expression:SOME EXPRESSION to use a data defined value calculated using a custom QGIS expression - OUTPUT: Spectral library (optional) - Argument type: sink - Acceptable values: - - Path for new vector layer - - ---------------- - Outputs - ---------------- - - OUTPUT: - Spectral library - -.. - ## AUTOGENERATED COMMAND USAGE END - diff --git a/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_custom_sensor.rst b/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_custom_sensor.rst index 543c919c..2fbe0340 100644 --- a/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_custom_sensor.rst +++ b/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_custom_sensor.rst @@ -62,7 +62,7 @@ Usage: **Outputs** :guilabel:`Output spectral response function library` [fileDestination] - GEOJSON file destination. + GeoJSON file destination. :guilabel:`Output raster layer` [rasterDestination] Raster file destination. diff --git a/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_wavelength_and_fwhm.rst b/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_wavelength_and_fwhm.rst index c1b76bbf..1014f049 100644 --- a/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_wavelength_and_fwhm.rst +++ b/source/usr_section/usr_manual/processing_algorithms/spectral_resampling/spectral_resampling_to_wavelength_and_fwhm.rst @@ -45,7 +45,7 @@ Usage: **Outputs** :guilabel:`Output spectral response function library` [fileDestination] - GEOJSON file destination. + GeoJSON file destination. :guilabel:`Output raster layer` [rasterDestination] Raster file destination. diff --git a/source/usr_section/usr_manual/speclibs.rst b/source/usr_section/usr_manual/speclibs.rst index 7f5cb717..ecbe628e 100644 --- a/source/usr_section/usr_manual/speclibs.rst +++ b/source/usr_section/usr_manual/speclibs.rst @@ -9,26 +9,26 @@ Spectral Libraries are collections of (i) spectral profiles and (ii) attributes The EnMAP-Box stores spectral profiles in vector layers. Compared to "traditional" spectral library formats like CSV text files or the ENVI Spectral library format, this has some advantages: -* we can link spectral profiles to geometries (points, lines, polygons) and easily display them in GIS maps. - For example the locations of measurements made with a field spectrometer. +* We can link spectral profiles to geometries (points, lines, polygons) and easily display them in GIS maps. + For example, the locations of measurements made with a field spectrometer. -* spectral profiles can be linked with other spectral profiles. For example a "target" measurement and the related +* Spectral profiles can be linked with other spectral profiles. For example, a "target" measurement and the related "white reference" measurement can be stored together in the same vector layer feature. -* spectral profiles can be linked with an arbitrary number of numeric, textual or categorical attributes, +* Spectral profiles can be linked with an arbitrary number of numeric, textual or categorical attributes, each having a dedicated data type. We can use QGIS/GDAL or data format-specific features to prevent incorrect values and ensure data integrity by design. - For example, is can be ensured that *leaf area index* values have to be numeric and larger zero, + For example, it can be ensured that *leaf area index* values have to be numeric and larger zero, or that values of an attribute *material_type* need to exist in a list of predefined material names. -* spectral profiles can be stored in a wide range of data formats, ranging from local file types like +* Spectral profiles can be stored in a wide range of data formats, ranging from local file types like `GeoJSON `_ or `GeoPackage `_ to powerful database management systems like `PostgreSQL. `_. Each of them may have its own advantages, often specific to the project, user and metadata to be stored together with spectral profiles. -Since spectral profiles and their metadata are usually offered in different formats (ENVI, ASD, text files, ...) -the EnMAP-Box supports to :ref:`import profiles ` from wide range of file types. +Since spectral profiles and their metadata are usually offered in different formats (ENVI, ASD, text files, ...), +the EnMAP-Box supports :ref:`importing profiles ` from a wide range of file types. .. figure:: img/speclibs/overview.png :width: 60% @@ -42,17 +42,16 @@ the EnMAP-Box supports to :ref:`import profiles ` from ----------------------------------------------- - The *Spectral Library Viewer* is the main tool to display spectral profiles in the EnMAP-Box. -It showa profiles that can be stored in different :ref:`profile_fields` and in different vector layers. +It shows profiles that can be stored in different :ref:`profile_fields` and in different vector layers. The plot settings panel on the right of the viewer is shown by activating the |legend| button. -The panel is used to setup one or multiple *profile visualizations*. Each defines: +The panel is used to set up one or multiple *profile visualizations*. Each defines: -* the vector layer and :ref:`profile_fields` to read the spectral profiles -* the profile styling: line type, symbol type, color. The color can be set static or using a QGIS expression. -* the profile name: a QGIS expression that generates the name that is used in the legend -* an optional filter, for example to display only profiles matching with a criterion like `class_type='vegetation'` +* The vector layer and :ref:`profile_fields` to read the spectral profiles +* The profile styling: line type, symbol type, color. The color can be set statically or using a QGIS expression. +* The profile name: a QGIS expression that generates the name that is used in the legend +* An optional filter, for example to display only profiles matching a criterion like `class_type='vegetation'` The *General Settings* node allows to adjust the general appearance of the plot, e.g. by @@ -76,9 +75,9 @@ Selecting vector features in a map or attribute table does highlight the related --------------------------------------------- The *Attribute Table* widget can be used to inspect and modify profile attributes. It -displays vector data either in a *table view* or a *form view*. -The form view shows attribute values in specialized widgets, that can be configured in the layer properties. -The *SpectralProfile* form allows to show spectral profile values as graph, JSON text, or in a small table. +displays vector data either in *table view* |mActionOpenTable| or using the *form view* |mActionFormView|. +The form view for *Spectral Profile* fields allows to show spectral profile values as +graph, JSON document or in a table. .. tabs:: @@ -90,19 +89,19 @@ The *SpectralProfile* form allows to show spectral profile values as graph, JSON .. tab:: |mActionFormView| Form View - .. figure:: img/speclibs/attributetable_formview.png + .. figure:: img/speclibs/speclib_table_formview.gif Attribute table widget, showing spectral library attributes in form view. -The attribute table widget can be opened from different places, e.g. the context menu of a -vector data source in the data sources panel or a vector layer in a layer tree of the data view panel. +The attribute table widget can be opened from different places, e.g., the context menu of a +vector data source in the data sources panel or a vector layer in the layer tree of the data view panel. In the Spectral Library Viewer it can be selected from the toolbar and the context menu of a profile visualization node, whose vector layer will then be opened in the attribute table widget. .. figure:: img/speclibs/speclibviewer_open_attributetable.png - Opening the attribute for a vector layer whose profiles are shown in the spectral library viewer. + Opening the attribute table for a vector layer whose profiles are shown in the spectral library viewer. .. _profile_data: @@ -124,10 +123,10 @@ In addition it is possible to specify: * ``x`` a list of position values along the x-axis, e.g. the band wavelength * ``xUnit`` a string describing the unit of the x values * ``yUnit`` a string describing the unit of the y values -* ``bbl`` a list of bad band multipliers values: +* ``bbl`` a list of bad band multiplier values -If defined, the lists for ``x`` and ``bbl`` need to have the same length like ``y``. -Values in `xUnit` should use SI-symbols wherever possible, e.g. ``μm`` instead of ``um`` or ``micrometers``. +If defined, the lists for ``x`` and ``bbl`` need to have the same length as ``y``. +Values in `xUnit` should use SI symbols wherever possible, e.g., ``μm`` instead of ``um`` or ``micrometers``. .. code-block:: text @@ -139,9 +138,166 @@ Values in `xUnit` should use SI-symbols wherever possible, e.g. ``μm`` instead "bbl" : [1, 0, ... , 1] } +Modify spectral profiles +------------------------ + +The EnMAP-Box is highly generic in how it supports raster and spectral data. +After collecting spectral profiles, e.g. from raster images, by importing them from field measurements +or sources like the USGS Spectral Library, the EnMAP Box offers different ways to modify them. + +Profile Editor +^^^^^^^^^^^^^^ + +Using the attribute table widget, the *Form View* |mActionFormView| for *Spectral Profile* fields can be used +to edit profile values, either using a JSON editor or a table that lists the profile values. + +1. Open the attribute table of a spectral library +2. Activate the form view |mActionFormView| +3. Activate the layer edit mode +4. Select the JSON or Table view +5. Edit the profile values + +.. figure:: img/speclibs/speclib_table_formview.gif + + Setting an outlier value to NaN. + + +Field Calculator +^^^^^^^^^^^^^^^^ + + +Simple calculations can be done using the *QGIS Field Calculator*. + +1. Open an attribute table +2. Open the Field Calculator +3. Set a new field name or the name of a field you would like to update +4. Use the *spectral_math* function to calculate new profiles using a Python expression. Ensure that the + output type meets the field type. +5. If a new field was created, use the layer settings to ensure that the editor widget type is set to *Spectral Profile* + +*Example: Calculate reflectance profiles* + +Let's assume we have imported radiance measurements made with an ASD Field Spectrometer (for example, the `*.asd` files available +`here `_). + +For each measurement we have the radiance profile of the white reference panel (*reference*) and the target surface (*target*). +To obtain the surface reflectance, we need to divide the target radiance by the corresponding white reference radiance +(https://eol.pages.cms.hu-berlin.de/geo_rs/S04_Lab_and_field_spectroscopy.html). + + +1. Open an attribute table +2. Open the *Field Calculator* |mActionCalculateField| +3. Define the output field. This can be a new field or an existing one. +4. Use the *spectral_math* function to calculate new profiles + + * define the input profiles. E.g., let `p1` be the field with the reference radiance profiles and + `p2` the field with target radiance profiles. + * define a Python expression that calculates output profiles. For example: + ``y = y2 / y1`` to divide target radiance by the reference radiance and obtain a reflectance profile. + * ensure that the *spectral_math* function's output type meets the type of the output field. + For example, use ``format='text'`` if profiles are written into a string/varchar field. + +5. Press 'OK' + + +.. figure:: img/speclibs/speclib_fieldcalculator_spectralmath.png + + QGIS field calculator with spectral_math function to calculate profile reflectances. + + +The *spectral_math* function makes input `profile data `_ available to the Python expression as follows: + +* `y` -> ``y``, 1D numpy array, e.g., ``y1`` for y values of the first input profile +* `x` -> ``x``, 1D numpy array, e.g., ``x1`` for x values of the first input profile +* `xUnit` -> ``xUnit``, string, e.g., ``xUnit1`` for the xUnit string of the first input profile + +The output profile is specified using the following variables and default values: + +* `y` numpy array or list with y values, defaults to `y1` +* `x` numpy array or list with x values, defaults to `x1` +* `xUnit` string with x unit, e.g., `nanometers`, defaults to `xUnit1` + + +.. figure:: img/speclibs/speclib_field_calculator_reflectance.gif + + Calculating profile reflectances using the QGIS Field Calculator. + + +Spectral Processing +^^^^^^^^^^^^^^^^^^^ + +The *Spectral Processing* tool uses *QGIS Processing Algorithms* to process spectral profiles. + +1. Open an EnMAP-Box Spectral Library viewer +2. Within the plot settings tree, select a profile source you would like to process. +3. Click the *Spectral Processing* button |profile_processing| to open the Spectral Processing Dialog. +4. Select a processing algorithm that uses raster layers as input +5. Set your processing parameters. +6. Define the processing output. File names will be mapped into existing or new vector layer fields. +7. Click *Run* to start the processing. + + +.. figure:: img/speclibs/speclib_resampling_landsat.gif + + Using the Spectral Processing dialog to resample EnMAP profiles to Landsat. + +.. figure:: img/speclibs/spectral_processing_workflow.png + + The data flow handled by the Spectral Processing Dialog to use vector attribute values as raster inputs for + QGIS Processing algorithms. + + +The Spectral Processing Dialog maps the attributes of a spectral library vector layer to temporary raster files. +These files are then used as input for QGIS Processing Algorithms. Created raster outputs are converted back into +attribute values for the spectral library vector layer. For example, the attribute fields of a spectral library +with n = 20 features (aka rows in the Table view) are converted into rasters with one line and 20 pixels. +The data type and number of bands of these temporary raster files depend on the input vector attributes. + +.. list-table:: Mapping of vector attributes field values to temporary raster files + :header-rows: 1 + + * - Field Type + - Raster File + * - Spectral Profile + - float raster with n > 1 bands + * - int / float + - int / float raster with n = 1 band + * - string / any other data type + - int classification image with n = 1 band.
Each unique string value is an individual class value + +.. list-table:: Mapping of raster outputs into vector layer attributes + :header-rows: 1 + + * - Raster File + - Vector Field + * - n > 1 bands + - Spectral profile + * - n = 1 band, int / float + - int / float + * - n = 1 band, classification + - string field containing the class name of each input pixel + + + +Python Code +^^^^^^^^^^^ + + + +.. tabs:: + + .. tab:: QGIS API + + .. todo:: Add example + + .. tab:: GDAL only + + .. todo:: Add example + .. _profile_fields: + |profile_fields| Profile Fields ------------------------------- @@ -171,12 +327,12 @@ The EnMAP-Box can read and write profile data into any vector layer field of the - `QByteArray `_ - deprecated, please use TEXT, VARCHAR or JSON data types -However, many text, JSON and BLOB may be used for different purposes. It is therefore required -to flag those fields that are to used to store spectral profiles by setting the field's editor -widget type to *SpectralProfile*. This can be done in the *Layer Property Dialog* or Python. +However, many text, JSON, and BLOB fields may be used for different purposes. It is therefore required +to flag those fields that are used to store spectral profiles by setting the field's editor +widget type to *SpectralProfile*. This can be done in the *Layer Property Dialog* or via Python. -A \*.qml sidecar file, e.g. `myspeclib.qml` next to `myspeclib.gpkg`, allows to -save layer properties like the editor widget type persistently. This way QGIS can restore it +A \*.qml sidecar file, e.g., `myspeclib.qml` next to `myspeclib.gpkg`, allows you to +save layer properties like the editor widget type persistently. This way QGIS can restore them automatically when loading the vector source again. @@ -196,8 +352,8 @@ automatically when loading the vector source again. .. tab:: PyQGIS - This exmaple shows how to use the QGIS Python API to set the editor widget type - to `SpectralProfiles` and to save these settings as default style. + This example shows how to use the QGIS Python API to set the editor widget type + to `SpectralProfiles` and save these settings as the default style. .. code-block:: python @@ -213,7 +369,7 @@ automatically when loading the vector source again. .. tab:: QML - A minimal QML file to ensure, that data from the vector field "profiles" is used as profile field. + A minimal QML file to ensure that data from the vector field "profiles" is used as a profile field. .. code-block:: xml @@ -232,11 +388,11 @@ automatically when loading the vector source again. -The profile fields of vector layers that opened in the EnMAP-Box, e.g. as layer in a map, can be selected as source for a profile visualization +The profile fields of vector layers that are opened in the EnMAP-Box, e.g., as a layer in a map, can be selected as a source for a profile visualization .. figure:: img/speclibs/speclibview_multiple_speclibs.png - Selection of a profile field as source for a visualization. + Selection of a profile field as a source for a visualization. .. _speclib_collect_profiles: @@ -247,11 +403,11 @@ The profile fields of vector layers that opened in the EnMAP-Box, e.g. as layer To collect spectral profiles from raster layers, go into the toolbar and activate the *Identify map tool* |select_location| with option *Identify pixel profiles* |profile|. -Now click on a raster pixel. By default, this create a new in-memory vector layer "Profiles #1" and opens a spectral library viewto show it. The *Spectral Profile Sources* panel can be used to specify how profiles are collected, e.g. from which raster layer, and to which vector layer field they will be written. In addition it allows to specify values for other other fields of the vector layer too, e.g. to generate a profile name automatically. +Now click on a raster pixel. By default, this creates a new in-memory vector layer "Profiles #1" and opens a spectral library view to show it. The *Spectral Profile Sources* panel can be used to specify how profiles are collected, e.g., from which raster layer, and to which vector layer field they will be written. In addition, it allows you to specify values for other fields of the vector layer, e.g., to generate a profile name automatically. .. figure:: img/speclibs/profilesourcepanel.png - The spectral profile source panel described how profiles are collected and written to vector layers. + The spectral profile source panel describes how profiles are collected and written to vector layers. .. _speclib_import_profiles: @@ -301,7 +457,7 @@ The *Export Spectral Profiles* algorithm allows to save spectral profiles in other file formats. It can be opened either from the Spectral Library Viewer, using the |speclib_save| button, or from the QGIS processing toolbox (``enmapbox:exportspectralprofiles``). -The algorithm requires to specify the *Profile Field* whose profiles are to save, and a field or QGIS expression +The algorithm requires to specify the *Profile Field* whose profiles are to be saved, and a field or QGIS expression to get a profile name from. @@ -331,6 +487,8 @@ to get a profile name from. .. |legend| image:: /img/icons/legend.svg :width: 28px +.. |mActionCalculateField| image:: /img/icons/mActionCalculateField.svg + :width: 28px .. |mActionFormView| image:: /img/icons/mActionFormView.svg :width: 28px .. |mActionOpenTable| image:: /img/icons/mActionOpenTable.svg @@ -339,6 +497,8 @@ to get a profile name from. :width: 28px .. |profile_fields| image:: /img/icons/profile_fields.svg :width: 28px +.. |profile_processing| image:: /img/icons/profile_processing.svg + :width: 28px .. |select_location| image:: /img/icons/select_location.svg :width: 28px .. |speclib| image:: /img/icons/speclib.svg