ComputeOGRLayersFeaturesStatistics

Compute statistics of the features in a set of OGR Layers

Description

Compute statistics (mean and standard deviation) of the features in a set of OGR Layers, and write them in an XML file. The resulting XML file can then be used by the training application.

Parameters

Vector Data -inshp vectorfile Mandatory
Name of the input shapefile

Output XML file -outstats filename [dtype] Mandatory
XML file containing mean and variance of each feature.

Feature -feat string1 string2...
List of features to consider for statistics.

Examples

From the command-line:

otbcli_ComputeOGRLayersFeaturesStatistics -inshp vectorData.shp -outstats results.xml -feat perimeter

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("ComputeOGRLayersFeaturesStatistics")

app.SetParameterString("inshp", "vectorData.shp")
app.SetParameterString("outstats", "results.xml")
app.SetParameterStringList("feat", "perimeter")

app.ExecuteAndWriteOutput()

Limitations

Experimental. For now only shapefiles are supported.

See also

OGRLayerClassifier,:ref:TrainVectorClassifier