Loading [MathJax]/extensions/tex2jax.js
Python script gmpLineModeler
See also
python.workflows.gmpLineModeler

Aim of module

Derives 3D structure lines from point clouds.

General description

The script performs the entire processing pipeline for the derivation of 3D structure lines consisting of the following steps:

  • importing point cloud
  • interpolating a digital terrain and slope model
  • 2d edge detection via Canny algorithm
  • vectorization of the resulting raster map
  • topological cleaning of vector line network
  • modeling of 3d structure lines

Parameter description

-cfgLinetopology cfg file for the Module LineTopology.Provide 3 different files for the three processing steps (longest, merge, longest)
Type : Path
Remark : mandatory
-qgisProject path to qgis project file, if one should be written. A QGIS installation is required.
Type : Path
Remark : optional
Common Package/Script Options
Settings concerning the general options for (package) scripts.
-infile input text file, directory or strip file
Type : Path
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 : Path
Remark : optional
Description: Specifies the directory where the final results are stored. If not specified, the results are created in the current working directory.
-tempdir temporary directory
Type : Path
Remark : optional, default: current directory
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 cfg file
Type : Path
Remark : optional, default: $OPALS_ROOT/cfg/gmpLineModeler.cfg
Description: cfg file for all module calls except LineTopology
-projectDir project directory
Type : Path
Remark : optional, default: current directory
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: 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 inputevaluates to
1, true, yes, Boolean(True), TrueBoolean(True)
0, false, no, Boolean(False), FalseBoolean(False)
-distribute determine how many local processes should be used
Type : String
Remark : optional
Description: according to the number chosen as the value, independent processes are being started to parallelise (parts of) the program and therefore enhance the runtime.
Logging Options
Settings concerning the verbosity level of logging.
-fileLogLevel Log level in the logfile
Type : LogLevel
Remark : optional, default: info
-screenLogLevel Log level on screen
Type : LogLevel
Remark : optional, default: info
-logger Logger
Type : Logger
Remark : optional
Description: Logger is usually provided by the opals framework.The user may provide their own logger object, but it has to function in the same way as the opals Logger.

Examples

Example 1

This first example derives the 3d structure lines for the entire flyover.laz dataset in a single-threaded way (i.e. without multi-processing).

gmpLineModeler -infile flyover.laz -cfg gmp_config.cfg -cfgLineTopology gmp_linetopology_step1.cfg gmp_linetopology_step2.cfg gmp_linetopology_step3.cfg

Example 2

As a prerequisite for this example, please cut the structure line demo dataset flyover.laz in tiles with side lenghts of 100m with 10m overlap.

preTiling -vector flyover.laz -tileSize 100 -overlap 10 -export opalsGeomorphTiles -skip 0
preCutting -vector flyover.laz -shape opalsGeomorphTiles_overlap.shp -export gmp -skip 0

Now gmpLineModeler can be used to derive the breaklines in each of the tiles using the parameters set in in the configuration files gmp_config.cfg and the three gmp_linetopology_stepx.cfg files. The -distribute parameter is used to parallelise this process, the integer that is set corresponds to the number of cores reserved for processing. With the -qgisProject Parameter one can specify the path to a qgis project that should be created after the script is finished running which contains all the output shapefiles.

gmpLineModeler -infile gmp*.odm -cfg gmp_config.cfg -cfgLineTopology gmp_linetopology_step1.cfg gmp_linetopology_step2.cfg gmp_linetopology_step3.cfg -skip 0

References

G. Mandlburger, J. Otepka, C. Briese, W. Mücke, G. Summer, N. Pfeifer, S. Baltrusch, C. Dorn, H. Brockmann: Automatische Ableitung von Strukturlinien aus 3D-Punktwolken. in: "Dreiländertagung der SGPF, DGPF und OVG: Lösungen für eine Welt im Wandel", T. Kersten (ed.); Publikationen der Deutschen Gesellschaft für Photogrammetrie, Fernerkundung und Geoinformation e.V., Band 25 (2016), ISSN: 0942-2870; 131 - 142.

Otepka, J., Mandlburger, G., Briese, C. und Pfeifer, N.: Fortschritte bei der automatischen Ableitung von Strukturlinien aus 3D-Punktwolken. 19. Internationale Geodätische Woche Obergurgl 2017, Hanke, K. & Weinold, Th. (Hrsg.) Herbert Wichmann Verlag, VDE VERLAG GMBH, Berlin/Offenbach. ISBN 978-3-87907-xxx

Author
fhacksto, gm, jo
Date
11.08.2023
@ overlap
specifies the overlap for sequential operations
@ vector
General vector data file (las, shp, ..)