Linear Spectral Unmixing

URL:
https://<rasteranalysistools-url>/LinearSpectralUnmixing
Methods:
GET
Version Introduced:
10.8

Description

Linear Spectral Unmixing

The LinearSpectralUnmixing task performs subpixel classification and calculates the fractional abundance of end members for individual pixels.

Request parameters

ParameterDetails

inputRaster

(Required)

The portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be added to the image collection. At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemId takes priority.

Syntax: A JSON object describes the input raster.

Use dark colors for code blocksCopy
1
2
3
4
inputRaster={"folderId": <portal folder id>}
inputRaster={"itemIds": [<portal item id>, <portal item id>, <portal item id>]}
inputRaster={"urls": [<image service url>, <image service url>, <image service url>]}
inputRaster={"uris": [<cloud raster uri or shared data path>, <cloud raster uri or shared data path>]}

outputName

(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 raster store and shared on either the Raster Analysis Image Server or Image Hosting Image Server depending on the Enterprise configuration.

Syntax: JSON object describes the output raster. At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemid takes priority.

Example:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
//Portal Item ID
{"itemId": <portal item id>}

//Image Service URL
{"url": <image service url}

//Service Properties
{"serviceProperties":{"name":"testrasteranalysis",
  "serviceUrl":"https://<server name>/server/rest/services/Hosted/testrasteranalysis/ImageServer"},
  "itemProperties":{"itemId":"8cfbd3ec25584d0d8f4ed23b8ff7c43b", "folderId", "sdfwerfbd3ec25584d0d8f4",: }}

inputSpectralProfile

(Required)

The spectral information for the different land cover classes. This should be specified in JSON format.

Syntax: JSON format.

Example

Use dark colors for code blocksCopy
1
inputSpectralProfile={"EsriEndmemberDefinitionFile":0,"FileVersion":1,"NumberOfEndmembers":3,"NumberOfBands":7,"Endmembers":[{"ID":1,"Name":"urban","SpectralProfile":[88,42,48,38,86,115,59,10]},{"ID" : 2,"Name":"vegetation","SpectralProfile":[50,21,20,35,50,110,23,20]},{"ID":3,"Name":"water","SpectralProfile":[51,20,14,9,7,116,4,30]}]}

valueOption

(Optional)

List of options to define the output pixel values.

  • SUM_TO_ONE —Class values for each pixel are provided in decimal format with the sum of all classes equal to 1. For example, Class1 = 0.16; Class2 = 0.24; Class3 = 0.60 .
  • NON_NEGATIVE —There will be no negative output values.

Syntax: A list representing the value option.

Example

Use dark colors for code blocksCopy
1
valueOption=[“SUM_TO_ONE”, “NON_NEGATIVE”]

context

(Optional)

Contains additional settings that affect task execution. This task has the following settings:

f

The response format. The default response format is html.

Values: html | json

Example usage

The following is a sample request URL for LinearSpectralUnmixing :

Use dark colors for code blocksCopy
1
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/LinearSpectralUnmixing

Response

When you submit a request, the task assigns a unique job ID for the transaction.

Syntax:

Use dark colors for code blocksCopy
1
{ "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 Check job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

Use dark colors for code blocksCopy
1
https://<rasterAnalysisTools-url>/LinearSpectralUnmixing/jobs/<jobId>

When the status of the job request is esriJobSucceeded , you can access the results of the analysis by making a request of the following form:

Use dark colors for code blocksCopy
1
https://<rasterAnalysisTools-url>/LinearSpectralUnmixing/jobs/<jobId>/results/result

JSON Response example

The response returns the results output parameter, which has properties for parameter name, data type, and value. The content of value is always the image service URL.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "paramName": "result",
  "dataType": "GPString",
  "value": {
		  "itemId":"1780d648db3545bba8661ad98df824a4",
				"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.