# SampleExtraction

## Brief Description

Extracts samples values from an image.

## Tags

Learning

## Long Description

The application extracts samples values from animage using positions contained in a vector data file.

## Parameters

- [param] -in <string> Support image. Mandatory: True. Default Value: ""
- [param] -vec <string> Vector data file containing samplingpositions. (OGR format). Mandatory: True. Default Value: ""
- [param] -out <string> Output vector data file storing samplevalues (OGR format). If not given, the input vector data file is updated. Mandatory: False. Default Value: ""
- [param] -field <string> Name of the field carrying the classname in the input vectors. This field is copied to output.. Mandatory: False. Default Value: "class"
- [param] -layer <int32> Layer index to read in the input vector file.. Mandatory: False. Default Value: "0"
- [param] -ram <int32> Available memory for processing (in MB). Mandatory: False. Default Value: "128"
- [param] -inxml <string> Load otb application from xml file. Mandatory: False. Default Value: ""
- [param] -outxml <string> Save otb application to xml file. Mandatory: False. Default Value: ""
[choice] -outfield Choice between naming method for output fields prefix,list. Mandatory: True. Default Value: "prefix"

- [group] -prefix

- [param] -outfield.prefix.name <string> Prefix used to form the field names thatwill contain the extracted values.. Mandatory: True. Default Value: "value_"

- [group] -list

- [param] -outfield.list.names <string> Full list of output field names.. Mandatory: True. Default Value: ""

## Limitations

None

## Authors

OTB-Team

## See Also

## Example of use

- in: support_image.tif

- vec: sample_positions.sqlite

- outfield: prefix

- outfield.prefix.name: band_

- field: label

- out: sample_values.sqlite