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. This 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.

Load parameters from XML -inxml filename.xml
Load application parameters from an XML file.

Save parameters to XML -outxml filename.xml
Save application parameters to an XML file.

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.ExecuteAndWriteOutput()

Limitations

Experimental. For now only shapefiles are supported.

See also

OGRLayerClassifier,:ref:TrainVectorClassifier