OTB.SampleSelection: Selects samples from a training vector data set.

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). - percent: set a target global percentage of samples to use. Class proportions will be respected. - total: set a target total number of samples to use. Class proportions will be respected. There is also a choice on the sampling type to performs : - periodic : select samples uniformly distributed - random : select samples randomly distributedOnce 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

Inputs

Support image that will be classified

format
href
Please set a value for in.

Validity mask (only pixels corresponding to a mask value greater than 0 will be used for statistics)

format
href
Please set a value for mask.

Input geometries to analyse

format
href
Please set a value for vec.

Input file storing statistics (XML format)

format
href
Please set a value for instats.

Type of sampling (periodic, pattern based, random)

string
Please set a value for sampler.

Jitter amplitude added during sample selection (0 = no jitter)

integer

strategy

string
Please set a value for strategy.

Number of samples by class (CSV format with class name in 1st column and required samples in the 2nd.

format
href
Please set a value for strategy.byclass.in.

Number of samples for all classes

integer
Please set a value for strategy.constant.nb.

The percentage to use

number
Please set a value for strategy.percent.p.

The number of samples to generate

integer
Please set a value for strategy.total.v.

Name of the field carrying the class name in the input vectors.

string
Please set a value for field.

Layer index to read in the input vector file.

integer

This parameter allows selecting a directory containing Digital Elevation Model files. Note that this directory should contain only DEM files. Unexpected behaviour might occurs if other images are found in this directory.

string

Use a geoid grid to get the height above the ellipsoid in case there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles. A version of the geoid can be found on the OTB website(https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb-data/blob/master/Input/DEM/egm96.grd).

format
href
Please set a value for elev.geoid.

This parameter allows setting the default height above ellipsoid when there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles, and no geoid file has been set. This is also used by some application as an average elevation value.

number
Please set a value for elev.default.

Available memory for processing (in MB)

integer

Set specific seed. with integer value.

integer

Outputs

Output resampled geometries

format
transmission

Output rates (CSV formatted)

format
transmission

Execution options

successUri
inProgressUri
failedUri

format

mode

Execute End Point

View the execution endpoint of a process.

View the alternative version in HTML.

{"id": "OTB.SampleSelection", "title": "Selects samples from a training vector data set.", "description": "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). - percent: set a target global percentage of samples to use. Class proportions will be respected. - total: set a target total number of samples to use. Class proportions will be respected. There is also a choice on the sampling type to performs : - periodic : select samples uniformly distributed - random : select samples randomly distributedOnce 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", "version": "1.0.0", "jobControlOptions": ["sync-execute", "async-execute", "dismiss"], "outputTransmission": ["value", "reference"], "links": [{"rel": "http://www.opengis.net/def/rel/ogc/1.0/execute", "type": "application/json", "title": "Execute End Point", "href": "http://demo.mapmint.com/ogc-api/processes/OTB.SampleSelection/execution"}, {"rel": "alternate", "type": "text/html", "title": "Execute End Point", "href": "http://demo.mapmint.com/ogc-api/processes/OTB.SampleSelection/execution.html"}], "inputs": {"in": {"title": "Support image that will be classified", "description": "Support image that will be classified", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["image/tiff", "image/jpeg", "image/png"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}, "id": "in"}, "mask": {"title": "Validity mask (only pixels corresponding to a mask value greater than 0 will be used for statistics)", "description": "Validity mask (only pixels corresponding to a mask value greater than 0 will be used for statistics)", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["image/tiff", "image/jpeg", "image/png"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}}}], "nullable": true}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}, "id": "mask"}, "vec": {"title": "Input geometries to analyse", "description": "Input geometries to analyse", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["image/tiff", "image/jpeg", "image/png"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}, "id": "vec"}, "instats": {"title": "Input file storing statistics (XML format)", "description": "Input file storing statistics (XML format)", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["text/xml"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/xml"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/xml"}]}, "id": "instats"}, "sampler": {"title": "Type of sampling (periodic, pattern based, random)", "description": "Type of sampling (periodic, pattern based, random)", "schema": {"type": "string", "default": "periodic", "enum": ["periodic", "random"]}, "id": "sampler"}, "sampler.periodic.jitter": {"title": "Jitter amplitude added during sample selection (0 = no jitter)", "description": "Jitter amplitude added during sample selection (0 = no jitter)", "schema": {"type": "integer", "default": 0, "nullable": true}, "id": "sampler.periodic.jitter"}, "strategy": {"title": "strategy", "description": "strategy", "schema": {"type": "string", "default": "smallest", "enum": ["byclass", "constant", "percent", "total", "smallest", "all"]}, "id": "strategy"}, "strategy.byclass.in": {"title": "Number of samples by class (CSV format with class name in 1st column and required samples in the 2nd.", "description": "Number of samples by class (CSV format with class name in 1st column and required samples in the 2nd.", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["image/tiff", "image/jpeg", "image/png"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "image/tiff"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/jpeg"}, {"type": "string", "contentEncoding": "base64", "contentMediaType": "image/png"}]}, "id": "strategy.byclass.in"}, "strategy.constant.nb": {"title": "Number of samples for all classes", "description": "Number of samples for all classes", "schema": {"type": "integer"}, "id": "strategy.constant.nb"}, "strategy.percent.p": {"title": "The percentage to use", "description": "The percentage to use", "schema": {"type": "number", "default": 0.5, "format": "double"}, "id": "strategy.percent.p"}, "strategy.total.v": {"title": "The number of samples to generate", "description": "The number of samples to generate", "schema": {"type": "integer", "default": 1000}, "id": "strategy.total.v"}, "field": {"title": "Name of the field carrying the class name in the input vectors.", "description": "Name of the field carrying the class name in the input vectors.", "maxOccurs": 1024, "schema": {"type": "string", "default": "Any value"}, "id": "field"}, "layer": {"title": "Layer index to read in the input vector file.", "description": "Layer index to read in the input vector file.", "schema": {"type": "integer", "default": 0, "nullable": true}, "id": "layer"}, "elev.dem": {"title": "This parameter allows selecting a directory containing Digital Elevation Model files. Note that this directory should contain only DEM files. Unexpected behaviour might occurs if other images are found in this directory.", "description": "This parameter allows selecting a directory containing Digital Elevation Model files. Note that this directory should contain only DEM files. Unexpected behaviour might occurs if other images are found in this directory.", "schema": {"type": "string", "default": "Any value", "nullable": true}, "id": "elev.dem"}, "elev.geoid": {"title": "Use a geoid grid to get the height above the ellipsoid in case there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles. A version of the geoid can be found on the OTB website(https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb-data/blob/master/Input/DEM/egm96.grd).", "description": "Use a geoid grid to get the height above the ellipsoid in case there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles. A version of the geoid can be found on the OTB website(https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb-data/blob/master/Input/DEM/egm96.grd).", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["application/octet-stream"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "application/octet-stream"}]}}}], "nullable": true}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "base64", "contentMediaType": "application/octet-stream"}]}, "id": "elev.geoid"}, "elev.default": {"title": "This parameter allows setting the default height above ellipsoid when there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles, and no geoid file has been set. This is also used by some application as an average elevation value.", "description": "This parameter allows setting the default height above ellipsoid when there is no DEM available, no coverage for some points or pixels with no_data in the DEM tiles, and no geoid file has been set. This is also used by some application as an average elevation value.", "schema": {"type": "number", "default": 0, "format": "double"}, "id": "elev.default"}, "ram": {"title": "Available memory for processing (in MB)", "description": "Available memory for processing (in MB)", "schema": {"type": "integer", "default": 128, "nullable": true}, "id": "ram"}, "rand": {"title": "Set specific seed. with integer value.", "description": "Set specific seed. with integer value.", "schema": {"type": "integer", "nullable": true}, "id": "rand"}}, "outputs": {"out": {"title": "Output resampled geometries", "description": "Output resampled geometries", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["text/xml", "text/plain"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/xml"}, {"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/plain"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/xml"}, {"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/plain"}]}, "id": "out"}, "outrates": {"title": "Output rates (CSV formatted)", "description": "Output rates (CSV formatted)", "extended-schema": {"oneOf": [{"allOf": [{"$ref": "http://zoo-project.org/dl/link.json"}, {"type": "object", "properties": {"type": {"enum": ["text/csv"]}}}]}, {"type": "object", "required": ["value"], "properties": {"value": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/csv"}]}}}]}, "schema": {"oneOf": [{"type": "string", "contentEncoding": "utf-8", "contentMediaType": "text/csv"}]}, "id": "outrates"}}}

http://demo.mapmint.com/ogc-apihttp://localhost/ogc-api/processes/OTB.SampleSelection.html
Last modified: Sat Feb 19 15:43:34 CET 2022