Module Info
See Also

Aim of module

Extracts and reports header information of a vector or raster file (ODM, GDAL).

General description

opalsInfo extracts statistic information (number of points/lines/polygons, the bounding box, attribute information, spatial index details, etc..) from a data set input file. Currently, only ODMs are supported. However, the support of vector files, grid and tin file formats is planned for the future. In general, all information provided in the header of the file format is made available through a generic file statistics object.

See Also
Module Info

Parameter description

-inFileinput file
Type: opals::Path
Remarks: mandatory
In the future ODMs, original data files, grid and tin files can be specified as input file. Currently only ODM are supported.
-statisticfile statistics
Type: opals::DataSetStats
Remarks: output
The result of the file statistic extraction provided as generic object. Specify -outParamFile in order to store these results to an XML file.
-exportHeaderexport header features
Type: opals::Vector<opals::HeaderFeature>
Remarks: optional

Possible values:  
  all .............. all possible header feature
  overviewZ ........ Z-Matrix overview
  overviewPcount ... Pcount-Matrix overview

Exports internally stored header information to files. This parameter is currently supported with ODMs file only.


The data used in the following example are located in the $OPALS_ROOT/demo/ directory. The example shows how to use opalsInfo to get an overview about data (including their attributes) within an odm.

Example 1:

As a prerequisite, the ALS point cloud data must be imported into the ODM. To achieve that, change to the demo directory and type:

opalsImport -inFile fullwave.fwf

Now, run the following command

opalsInfo -inFile fullwave.odm

which gives the following output:

14:24:23 info: Data set statistic
Filename D:\opals\demo\fullwave.odm
Point Count 67413
Line Count 0
Polygon Count 0
Minimum X-Y-Z 24820.000 311160.006 275.535
Maximum X-Y-Z 25000.000 311260.000 328.500
Point density 8.35

After a generic information block the section about the data set attributes is listed. Figure 1 captures the corresponding section from the log file.

Fig. 1: Attribute statistics of demo data set fullwave.fwf

A special feature of the ODM is the on-the-fly collection of statistical information of all attributes. A useful feature for checking the correctness of imported or processed data. The last five attributes (Id, FileId, LayerId, WinputCode and StructNr) are "virtual" attributes. They exist for internally reason, however, are not made persistent on disk.

With the following command

opalsNormals -infile fullwave.odm -neighbours 8 -searchRadius 1

local planes are estimated within each point of the data set. In the current example the computation succeeds for 67297 points (and fails in 116 cases). Running opalsInfo again

opalsInfo -inFile fullwave.odm

will show the newly added attributes (c.f. Figure 2). The statistics also reflect the number of successful computated plane estimations (For NormalSigma0 even less values have been set, since redundancy is required for its computation).

Fig. 2: Attribute statistics after normals estimation

The last section of the module output covers information of the spatial index (c.f. Figure 3). The spatial index statistics is also reported after importing a data set, since it is crucial for processing the ODM. For further details please refer to section Analysing the index statistics of an ODM.

Fig. 3: Spatial index information

Example 2:

When running Module Info within a Python script, direct access to the statistics of the dataset is provided via the OPALS Python API. This is exemplified in the sample script $OPALS_ROOT/demo/

1 import opals
2 from import Debug_Mode
4 if Debug_Mode == False:
5  from opals import Import
6  from opals import Info
7 else:
8  from opals import Import_d as Import
9  from opals import Info_d as Info
10 #
11 # Set screen log level
12 #
13 logLevel=opals.Types.LogLevel.none
14 #
15 # Import strip11.laz dataset into an ODM
16 #
17 imp = Import.Import(inFile=["strip11.laz"], tileSize=5, screenLogLevel=logLevel)
19 #
20 # Run opalsInfo and query statistic object
21 #
22 inf = Info.Info(inFile=imp.outFile, screenLogLevel=logLevel)
24 att_stat = inf.statistic.getAttributes()
25 idx_stat = inf.statistic.getIndices ()
26 #
27 # Print attribute statistics
28 #
29 print("Attribute statistics of file {}".format(imp.outFile) )
30 print("Name: Count/Min/Mean/Max")
31 for a in att_stat:
32  print( "Name {}: {:0d}/{:0.3f}/{:0.3f}".format( a.getName(), a.getCount(), \
33  a.getMin(), a.getMean(), a.getMax()))
34 print("-----------------------------------------------------------")
35 #
36 # Print spatial index statistics
37 #
38 print("Spatial index statistics of file {}".format(imp.outFile) )
39 for i in idx_stat:
40  print("{:0d} leaves".format( i.getCountLeaf()))
41  print("Tile size: {:0.1f}".format(i.getTileSize()))
42  print("Min #pts per leaf: {:0.1f}".format(i.getObjectsInLeafMin()))
43  print("Mean #pts per leaf: {:0.1f}".format(i.getObjectsInLeafMean()))
44  print("Max #pts per leaf: {:0.1f}".format(i.getObjectsInLeafMax()))

To run the script, type:


The script imports the dataset strip11.laz and queries the attribute and spatial index statistics. This is achieved by accessing the statistic parameter provided by Module Info. The script uses the access function of the complex Python type opals::DataSetStats to query (and print) the respective values.

Attribute statistics of file strip11.odm
Name: Count/Min/Mean/Max
Name Amplitude: 378712/1.000/68.774
Name EchoNumber: 378712/1.000/1.100
Name NrOfEchos: 378712/1.000/1.201
Name ClassificationFlags: 378712/0.000/0.000
Name ScanDirection: 378712/0.000/0.000
Name EdgeOfFlightLine: 378712/0.000/0.000
Name Classification: 378712/0.000/0.917
Name ScanAngle: 378712/0.000/0.000
Name UserData: 378712/0.000/0.000
Name PointSourceId: 378712/11.000/11.000
Name GPSTime: 378712/37983.419/37986.177
Name _PulseWidth: 378712/1.700/4.837
Name Id: 378712/2147483648.000/4729435047628892.000
Name FileId: 378712/1.000/1.000
Name LayerId: 378712/0.000/0.000
Name WinputCode: 378712/30.000/30.000
Name StructNr: 378712/0.000/0.000
Spatial index statistics of file strip11.odm
2090 leaves
Tile size: 5.0
Min #pts per leaf: 1.0
Mean #pts per leaf: 181.2
Max #pts per leaf: 530.0
jo, gm