- URL:
- https://<rasteranalysistools-url>/DetectTargetUsingSpectra
- Methods:
GET- Version Introduced:
- 12.1
Description
The Detect task processes a multiband or hyperspectral image and identifies pixels in an image that match a spectral signature. The output will be a multiband raster if the library file contains multiple spectral signatures.
Request parameters
| Parameter | Details |
|---|---|
(Required) | A multiband or hyperspectral image. Wavelength information is required when the target spectra is a library file, and a surface reflectance raster is recommended if the target spectra data is from a spectral library. The input raster can be the Portal ItemID, Image Service URL, cloud raster dataset or shared raster dataset. Syntax: JSON object describing the input raster(s). Example |
(Required) | Esri Spectral Library item ID. The item can be published from a spectral library file containing spectral signatures, or from a point feature class created by the training sample manager in classification tools in ArcGIS Pro. Syntax: JSON object describes the input spectra(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 new hosted image service with the given service properties. The output hosted image service is stored in a raster store and shared on either an ArcGIS Image Server with the raster analysis role or an ArcGIS Image Server with an image hosting role, depending on the configuration of ArcGIS Enterprise. 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 |
(Optional) | Specifies the method that will be used to compute the matching scores from the input image and the spectral signature file. All scores are normalized from 0 to 1 in which a higher score is a better match.
Syntax: A string of one of the above keywords. Example |
(Optional) | A boolean value to specify whether the spectra will be normalized from an image or reference data. When set as Values: |
| Contains additional settings that affect task execution. This task has the following settings:
|
Example
The following is a sample request URL for Detect:
https://organization.example.com/<context>/rest/services/System/RasterAnalysisTools/GPServer/DetectTargetUsingSpectra? inputRaster={"url": "<xxx/ImageServer>"}& inputSpectra= {"itemId": "53e0085ff8ae4a318ec0e6fa84afbdcf"}&method= SIDSAM& removeContinuum=true& 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:
https://<analysis url>/DetectTargetUsingSpectra/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:
https://<analysis url>/DetectTargetUsingSpectra/jobs/<jobId>Result retrieval URL once job succeeds:
https://<analysis url>/DetectTargetUsingSpectra/jobs/<jobId>/results/outputScoreRaster?token=<token>&f=json