- See also
- python.opalsQuality
Aim of module
Package script providing a complete processing chain for quality assessment of ALS flight strips.
General description
opalsQuality calculates DSMs and visualizations thereof, point density maps, strip difference maps, and estimates of strip difference vectors.
- See also
- Python script opalsQuality
The Python script opalsQuality is the main script for the corresponding opalsQuality package. It uses multiple sub-scripts to create different products for checking and documenting the quality of an ALS flight campaign. The following aspects are covered:
- Data import: This is a pre-requisite for all other steps. ALS point cloud data files are read into the ODM (one ODM per flight strip, script: python._import).
- Strip outline: Based on the ODMs, strip outlines (minimum bounding rectangle, convex hull, or alpha shape) are derived (script: python._bounds).
- Overlapping pairs: Based on the strip outlines the overlapping strip pairs are identified (script: python._overlap).
- Point density: Raster based analysis is performed based on the ODM and point density maps are created for each strip and for the overall project area (Python script qltDensity)
- DSM and visualizations: For each strip a digital surface model (DSM) is calculated and a color coded hypsometric map as well as a shaded relief map are derived (Python script qltDSM).
- Strip differences: Based on the DSMs and the list of overlapping strip pairs, difference models and color coded raster maps of the relative strip differences are derived. This is a basic product for assessing the quality of the flight strips orientation via visual inspection (Python script qltStripDiff).
- strip difference vectors: A more quantitative analysis is carried out for all overlapping strip pairs, by estimating a best fitting 3D-affine-transformation via an Least Squares Matching approach (Python script qltLSM).
The following table contains a list of all involved sub-scripts and their default storage location:
Parameter description
-mosaic create mosaics
Type : Boolean
Remark : Optional, default: Boolean(True)
Description:
Possible values:
| 1 | 1 |
| 0 | 0 |
| true | true |
| false | false |
| yes | yes |
| no | no |
| Boolean(True) | Boolean(True) |
| Boolean(False) | Boolean(False) |
| True | True |
| False | False |
-mask create grid masks (sigma0, eccentricity)
Type : Boolean
Remark : Optional, default: Boolean(True)
Description:
Possible values:
| 1 | 1 |
| 0 | 0 |
| true | true |
| false | false |
| yes | yes |
| no | no |
| Boolean(True) | Boolean(True) |
| Boolean(False) | Boolean(False) |
| True | True |
| False | False |
-gridMask raster file containing user-defined mask areas (e.g. water)
Type : PathArgument
Remark : Optional, default:
Description:
-slopeLimits slope limits (in degrees)
Type : Floating-point number
Remark : Optional, default: []
Description: optional slope limits (in degrees) for slope classes based analyses. e.g. 20 30 will result in three classes: <20, >=20 to <30, >=30
-qgisProject path to qgis project file, if one should be written. A QGIS installation is required.
Type : PathArgument
Remark : Optional
Description:
Common Package/Script Options
Settings concerning the general options for (package) scripts.
-infile input text file, directory or strip file
Type : String
Remark : Mandatory
Description: As input either the name of an ASCII file (extension .txt) containing the names of the data files (one file per line) or an expression using wildcards to specify the respective data sets are accepted.
-outfile output directory or settings file (.txt)
Type : String
Remark : Optional
Description: Specifies the directory where the final results are stored. If not specified, the results are created in the current working directory.
-temp temporary directory
Type : String
Remark : Optional, default: '.'
Description: Specifies the directory where all intermediate results are stored. If not specified, a TEMP subdirectory is created in the current working directory. Additional subdirectories (one per involved module) are created.
-cfg configuration file
Type : String
Remark : Optional
Description: The name of a configuration file containing all relevant calculation parameters is expected. If not specified, the default cfg files as provided by the OPALS distribution are used.
-projectDir project directory
Type : String
Remark : Optional
Description: The default project directory is the current working directory, but can be easily changed by this parameter. All path parameters, if not specified as absolute paths, are interpreted relative to the project directory.
-skipIfExists skip processing if result already exists
Type : Boolean
Remark : Optional, default: Boolean(True)
Description: Skip processing if result already exists. In order to re-run current script it is useful to repeat the processing only if the respective output does not already exist. This allows for incremental processing of large projects.
Possible values:
| 1 | 1 |
| 0 | 0 |
| true | true |
| false | false |
| yes | yes |
| no | no |
| Boolean(True) | Boolean(True) |
| Boolean(False) | Boolean(False) |
| True | True |
| False | False |
-gearman address and port of gearman job server
Type :
Remark : Optional
Description: currently this option is not yet supported. placed here for future reference
-subScripts list of sub-scripts to be executed separated by commas
Type : String
Remark : Optional, default: 'qltDSM,qltDensity,qltStripDiff,qltLSM'
Description:
Logging Options
Settings concerning the verbosity level of logging.
-screenLogLevel verbosity level of screen output
Type : fromStr
Remark : Optional, default: info
Description: The minimum level of log message importance to print on the screen
-fileLogLevel verbosity level of log file output
Type : fromStr
Remark : Optional, default: info
Description: The minimum level of log message importance to export to the xml-log
Examples
The data used in the following examples can be found in the $OPALS_ROOT/demo/ directory.
Example 1
In the first example, only the strip data file list is specified as input parameter:
opalsQuality -i striplist.txt
striplist.txt may, e.g., contain the following lines:
strip11.laz
strip12.laz
strip21.laz
strip22.laz
#strip31.laz
#strip32.laz
Please note, that in the above example, strip31 and strip32 are ignored, since the corresponding line starts with a hash (=comment) character. Thus, the quality assessment is only carried out for the rest of the strips (strip11, strip21, strip21 and strip 22). Since no further parameters are specified, the output files are created in the current working directory ($OPALS_ROOT/demo/), all intermediate files are stored in subfolders of $OPALS_ROOT/demo/ and the default configuration files stored in $OPALS_ROOT/packages/cfg are used.
Example 2
To use all strip*.laz files and store the resulting and temporary files each in a separate folders, type:
opalsQuality -i
strip*.laz -o resultsQuality -t tempdir
Example 3
For examples 1 and 2 to work, it is necessary that the current working directory is $OPALS_ROOT/demo/. To achieve the same results from any current working directory, using the -p parameter, pointing to the directory containing the strip files, is recommended.
opalsQuality -i
strip*.laz -o resultsQuality -t tempdir -p C:\OPALS\demo
Example 4
If only the strip differences should be calculated (disregarding already calculated intermediate outputs) for the overlapping strip pairs but not for the entire block, use the following command:
opalsQuality -i
strip*.laz -subScripts qltStripDiff -mosaic 0 -skipIfExists 0
Please note, that parameter names can be abbreviated as long as they can be unique resolved. E.g. -m is too short since it matches -mosaic and -mask, but -mo is ok. Hence, the very same command as above can also be written as:
opalsQuality -i
strip*.laz -sub qltStripDiff -mo 0 -skip 0
Example 5: Slope dependent analysis
Text to come...
opalsQuality -i
strip*.laz -skip 0 -slopeLimits 15 35