- URL:
- https://<rasteranalysistools-url>/ResampleLibrarySpectra
- Methods:
GET- Version Introduced:
- 12.1
Description
The Resample task resamples the bands of a spectral library to match the bands of a target spectral library or image, producing a new spectral library file. The target spectral library or image can be predefined from a list of common sensors, or it can be based on a custom image or spectra.
Request parameters
| Parameter | Details |
|---|---|
(Required) | An Esri spectral library or ENVI spectral library file with wavelength information. The input can be the Portal ItemID. Syntax: A JSON object describing the input library spectra. 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) | The output Esri spectral library file with the resampled wavelength information. Example |
(Required) | Specifies the target spectra, or a custom spectra library file or image, that contains the target spectra.
|
(Optional) | A custom spectral library file or image with wavelength information that contains the target spectra. This parameter is active when the Example: |
(Optional) | Specifies the resampling method that will be used for the output library spectra.
Syntax: string |
Example
The following is a sample request for URL for Resample:
https://organization.example.com/<context>/rest/services/System/RasterAnalysisTools/GPServer/ResampleLibrarySpectra?inputLibrarySpectra= {"itemId": "53e0085ff8ae4a318ec0e6fa84afbdcf"}&targetSensor=CUSTOM_TARGET_IMAGE_OR_SPECTRA&customTargetImageOrSpectra={"url": "xxx/ImageServer"}&resamplingMethod= GAUSSIAN_CONVOLUTION&outputName={"name":"output_name"}&f=jsonResponse
When you submit a request, the service assigns a unique job ID for the transaction.
{
"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>/ResampleLibrarySpectra/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>/ResampleLibrarySpectra/jobs/<jobId>Result retrieval URL once job succeeds:
https://<analysis url>/ResampleLibrarySpectra /jobs/<jobId>/results/outputLibrarySpectra?token=<token>&f=json