Python script preCalcFootprint
See Also
python.preCalcFootprint

Aim of script

proxy class for packages.python.preCalcFootprint

The aim of preCalcFootprint is to calculate the laser footprint area.

General description

Parameters
pointspacingremark : optional spacing between points for resulting ellipse polygon in [deg] (only if 'geometry polygon' is selected
limitsremark : optional "xmin xmax ymin ymax". ".." is neccessary.
beamdivergenceremark : mandatory divergence of the laser beam in [mrad]
trjFormatremark : optional format description to be used for parsing the input trajectory. This will be passed to theopalsImport module.
max_incidenceremark : optional maximum incidence angle for footprint calculation in [deg](default: 90)
geometryremark : optional output geometry type: point or polygon: polygons approximate the ellipse of the laser footprint
filterStrremark : optional DataManager filter for pre-selection of points (not implemented yet
outFileremark : optional polygon output file. If extension (.odm/.shp) is provided, the respective format will be used. Default format is .shp. if no outFile is given, results will be written back to the –inFile odm.
trjFileremark : optional path to the file containing the trajectory (if BeamVector Arguments are not set)
attributesremark : optional specify which features (multiple options allowed) should be saved to the output file to save multiple features use this option multiple times e.g. -attr area -attr axes
inFileremark : optional input DataManager file (*.odm)
See Also
Python script preCalcFootprint

The intersection area of a laser beam with the tangent plane of a target surface is commonly referred to as laser footprint. It's size depends on the range (sensor-to-target distance), the beam divergence (i.e. opening angle of the laser beam) and the incidence angle between the beam and the surface. The latter is calculated based on the laser beam direction and the surface normal vector.

Output can be either points or polygons, and either opals Datamanager (odm) or ESRI Shapefile (.shp). Different attributes can be selected for string by using the {-a, –attribute} parameter. In case of angles of incidence close to 90°, resulting ellipses will not be exact. To skip those automatically, the {–m, –max_incidence} parameter can be used.

Basic algorithm

The script uses a trigonometric approach to calculate the semimajor and semiminor axes of the theoretical elliptic footprint of the laser beam. In the next step, coordinates for points on this ellipse are calculated, with the ellipse in standard form and the points spaced apart {–pointspacing} degrees (eccentric anomaly). These points are then transformed into their position on the tangent plane.

Parameter description

-inFile input DataManager file (*.odm)
Type : PathArgument
Remark :Optional
Description:
-outFile polygon output file. If extension (.odm/.shp) is provided, the respective format will be used. Default format is .shp. if no outFile is given, results will be written back to the –inFile odm.
Type : PathArgument
Remark :Optional
Description:
-filter DataManager filter for pre-selection of points (not implemented yet
Type : String
Remark :Optional
Description:
-limits "xmin xmax ymin ymax". ".." is neccessary.
Type : String
Remark :Optional
Description:
-beamdivergence divergence of the laser beam in [mrad]
Type : Floating-point number
Remark :Mandatory
Description:
-trjFile path to the file containing the trajectory (if BeamVector Arguments are not set)
Type : PathArgument
Remark :Optional
Description:
-trjFormat format description to be used for parsing the input trajectory. This will be passed to theopalsImport module.
Type : String
Remark :Optional
Description:
-s/--pointspacing spacing between points for resulting ellipse polygon in [deg] (only if 'geometry polygon' is selected
Type : Floating-point number
Remark :Optional, default: 10
Description:
-attributes specify which features (multiple options allowed) should be saved to the output file
Type : String
Remark :Optional, default: ['area']
Description: to save multiple features use this option multiple times e.g. -attr area -attr axes
Possible values:

areasaves the area of the footprint as attribute (in sq.m.)
semimajorsaves the semimajor axis (in m)
semiminorsaves the semiminor axis (in m)
axessaves both axes (in m)
incidencesaves the angle of incidence (in rad)
pointidsaves the id of the originating point
beamvectorsaves the X/Y/Z components of the beam vector
normalvectorsaves the X/Y/Z components of the normal vector
-geometry output geometry type: point or polygon: polygons approximate the ellipse of the laser footprint
Type : String
Remark :Optional, default: 'polygon'
Description:
Possible values:

point
polygon
-max_incidence maximum incidence angle for footprint calculation in [deg](default: 90)
Type : Floating-point number
Remark :Optional, default: 90
Description:

Examples

The data used in the following examples can be found in the $OPALS_ROOT/demo/ directory.

As a prerequisite for the subsequent examples, please import the data using the following command:

opalsImport -inFile strip11.laz storebeamvector ######

Example 1

Calculate ellipse area and axes, store them in a polygon shapefile. Beam- and normal vectors are assumed as attributes.

opals preCalcFootprint -i strip11.odm -a area -a axes -o polygon_footprints.shp

Example 2

Calculate beam vectors "on-the-fly", and save the result in an odm as points (with attributes)

opals preCalcFootprint -i strip11.odm -a area -a incidence -o footprint.odm --trjFile TrjStrips_utm33.txt --trjFormat trajectory.xml -g point

Example 3

Write polygon information back to the original odm. Beam vectors are, again, assumed. The polygons will have the origninating point id and the three components of the beam vector as attributes.

opals preCalcFootprint -i strip11.odm -a pointid -a beamvector

References