mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
34 lines
5.9 KiB
HTML
34 lines
5.9 KiB
HTML
<html><head>
|
|
<style type="text/css">
|
|
dl { border: 3px double #ccc; padding: 0.5em; } dt { float: left; clear: left; text-align: left; font-weight: bold; color: green; } dt:after { content: ":"; } dd { margin: 0 0 0 220px; padding: 0 0 0.5em 0; }
|
|
</style>
|
|
</head><body><h1>SampleSelection</h1><h2>Brief Description</h2>Selects samples from a training vector data set.<h2>Tags</h2>Learning<h2>Long Description</h2>The application selects a set of samples from geometries intended for training (they should have a field giving the associated class).
|
|
|
|
First of all, the geometries must be analyzed by the PolygonClassStatistics application to compute statistics about the geometries, which are summarized in an xml file.
|
|
Then, this xml file must be given as input to this application (parameter instats).
|
|
|
|
The input support image and the input training vectors shall be given in parameters 'in' and 'vec' respectively. Only the sampling grid (origin, size, spacing)will be read in the input image.
|
|
There are several strategies to select samples (parameter strategy) :
|
|
- smallest (default) : select the same number of sample in each class
|
|
so that the smallest one is fully sampled.
|
|
- constant : select the same number of samples N in each class
|
|
(with N below or equal to the size of the smallest class).
|
|
- byclass : set the required number for each class manually, with an input CSV file
|
|
(first column is class name, second one is the required samples number).
|
|
There is also a choice on the sampling type to performs :
|
|
- periodic : select samples uniformly distributed
|
|
- random : select samples randomly distributed
|
|
Once the strategy and type are selected, the application outputs samples positions(parameter out).
|
|
|
|
The other parameters to look at are :
|
|
- layer : index specifying from which layer to pick geometries.
|
|
- field : set the field name containing the class.
|
|
- mask : an optional raster mask can be used to discard samples.
|
|
- outrates : allows outputting a CSV file that summarizes the sampling rates for each class.
|
|
|
|
As with the PolygonClassStatistics application, different types of geometry are supported : polygons, lines, points.
|
|
The behavior of this application is different for each type of geometry :
|
|
- polygon: select points whose center is inside the polygon
|
|
- lines : select points intersecting the line
|
|
- points : select closest point to the provided point
|
|
<h2>Parameters</h2><ul><li><b>[param] -in</b> <string> Support image that will be classified. Mandatory: True. Default Value: ""</li><li><b>[param] -mask</b> <string> Validity mask (only pixels corresponding to a mask value greater than 0 will be used for statistics). Mandatory: False. Default Value: ""</li><li><b>[param] -vec</b> <string> Input geometries to analyse. Mandatory: True. Default Value: ""</li><li><b>[param] -out</b> <string> Output resampled geometries. Mandatory: True. Default Value: ""</li><li><b>[param] -instats</b> <string> Input file storing statistics (XML format). Mandatory: True. Default Value: ""</li><li><b>[param] -outrates</b> <string> Output rates (CSV formatted). Mandatory: False. Default Value: ""</li><li><b>[param] -field</b> <string> Name of the field carrying the class name in the input vectors.. Mandatory: False. Default Value: "class"</li><li><b>[param] -layer</b> <int32> Layer index to read in the input vector file.. Mandatory: False. Default Value: "0"</li><li><b>[param] -ram</b> <int32> Available memory for processing (in MB). Mandatory: False. Default Value: "128"</li><li><b>[param] -rand</b> <int32> Set specific seed. with integer value.. Mandatory: False. Default Value: "0"</li><li><b>[param] -inxml</b> <string> Load otb application from xml file. Mandatory: False. Default Value: ""</li><li><b>[param] -outxml</b> <string> Save otb application to xml file. Mandatory: False. Default Value: ""</li><b>[choice] -sampler</b> Type of sampling (periodic, pattern based, random) periodic,random. Mandatory: True. Default Value: "periodic"<ul><li><b>[group] -periodic</b></li><ul><li><b>[param] -sampler.periodic.jitter</b> <int32> Jitter amplitude added during sample selection (0 = no jitter). Mandatory: False. Default Value: "0"</li></ul><li><b>[group] -random</b></li><ul></ul></ul><b>[choice] -strategy</b> byclass,constant,smallest,all. Mandatory: True. Default Value: "smallest"<ul><li><b>[group] -byclass</b></li><ul><li><b>[param] -strategy.byclass.in</b> <string> Number of samples by class (CSV format with class name in 1st column and required samples in the 2nd.. Mandatory: True. Default Value: ""</li></ul><li><b>[group] -constant</b></li><ul><li><b>[param] -strategy.constant.nb</b> <int32> Number of samples for all classes. Mandatory: True. Default Value: "0"</li></ul><li><b>[group] -smallest</b></li><ul></ul><li><b>[group] -all</b></li><ul></ul></ul></ul><h2>Limitations</h2>None<h2>Authors</h2>OTB-Team<h2>See Also</h2> <h2>Example of use</h2><ul><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">in: support_image.tif</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">vec: variousVectors.sqlite</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">field: label</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">instats: apTvClPolygonClassStatisticsOut.xml</p></li><li><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">out: resampledVectors.sqlite</p></li></ul></body></html> |