- URL:
- https://<rasteranalysistools-url>/ReduceSpectralBands
- Methods:
GET- Version Introduced:
- 12.2
Description
The Reduce task reduces the number of spectral bands in multiband imagery using Minimum Noise Fraction (MNF) and Principal Components Analysis (PCA) analytical methods.
Request URL:
http://<analysis-server-url>/ReduceSpectralBands/submitJob?inputRaster={"itemId":"<raster_item_id>"}&method="PCA"&numberOfComponents=10&outputName={"serviceProperties":{"name":"reduced_bands_raster"}}Request parameters
| Parameter | Details |
|---|---|
(Required) | A multiband or hyperspectral image. If the input is a multidimensional raster, the first slice will be used. The input raster can be the portal item ID, image service URL, cloud raster dataset or shared raster dataset. Syntax: A JSON object describing the input raster(s). Example |
(Required) | Output hosted image service properties. If the hosted image service is already created, the portal item ID or service URL can be given to the service tool. The output path of the raster dataset generated in the raster store will be used to update the existing service definition. The service tool can also generate a new hosted image service with the given service properties. The output hosted image service is stored in a raster store and shared on either the Raster Analysis Image Server or Image Hosting Image Server depending on your ArcGIS Enterprise configuration. Syntax: JSON object describes the output raster. Example At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemId takes the priority. |
(Optional) | Specifies the reduction method that will be used to transform and reduce the spectral bands.
Syntax: A string of one of the above keywords. Example |
(Optional) | The number of MNF or PCA components that the output will contain. The default value is equal to the number of bands contained in the image; however, if the image has more than 20 bands, then the default will be set to 20. Syntax: long Example |
(Optional) | This optional raster output is produced when the method parameter is set to MNF. It saves the MNF transformation coefficients used to transform the input image, in the form of number of input bands * (number of components+1). You can use this raster dataset to transform another image using the same coefficients. Syntax: JSON object describing the output raster. Example: |
(Optional) | This output table is produced when the method parameter is set to PCA. It lists weights that each input band contributes to the principal components. These weights define the correlations of the input data and the output principal components. Syntax: JSON object describing the output table. Example: |
(Optional) | This output is produced when the method parameter is set to PCA. The eigenvalues table indicates the variance percentage of each component. Eigenvalues help you define the number of principal components that are needed to represent the dataset. Syntax: JSON object describing the output table. Example: |
| Contains additional settings that affect task execution. This task has the following settings:
|
Example
The following is a sample request URL for Reduce:
https://organization.example.com/<context>/rest/services/System/RasterAnalysisTools/GPServer/ReduceSpectralBands?inputRaster={"url": "<xxx/ImageServer>"}&method=MNF&numberOfComponents=20&outputName={"serviceProperties":{"name":"<output_name>"}}&context={}&f=jsonResponse
When you submit a request, the service assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}After the initial request is submitted you can use the jobId to periodically check the status of the job and messages as described in the topic Checking job status. Once the job has successfully completed, you use the jobId to retrieve the results. To track the status, you can make a request of the following form:
http://<analysis url>/ReduceSpectralBands/jobs/<jobId>Accessing results:
When the status of the job request is esri, you can access the results of the analysis by making a request of the following form.
Status check URL:
http://<analysis url>/ReduceSpectralBands/jobs/<jobId>Result retrieval URL once job succeeds:
http://<analysis url>/ReduceSpectralBands/jobs/<jobId>/results/outputRaster?token=<token>&f=json