Skip To Content

Multidimensional Principal Components

Available with Image Analyst license.

Description

The MultidimensionalPrincipalComponents task transforms multidimensional rasters into their principal components (either dimension reduction or spatial reduction components), loadings, and eigenvalues.

License:
You must license ArcGIS Server as an ArcGIS Image Server to use this resource.

Request parameters

ParameterDetails
inputMultidimensionalRaster

(Required)

The input multidimensional raster. The input raster can be the portal folder ID, portal item ID, image service URL, cloud multidimensional raster dataset, or shared multidimensional raster dataset. The dataset can be of type Cloud Raster Format (CRF) or a multidimensional mosaic dataset.

The tool processes data along one dimension, such as a time series raster or a data cube defined by a nontime dimension [x, y, z]. If an input variable includes multiple dimensions, such as depth and time, the first dimension value will be used by default.

Syntax: A JSON object describes the input raster.


//Portal Folder ID
inputMultidimensionalRaster={"folderId": <portal folder id>}

//Portal Item ID
inputMultidimensionalRaster={"itemId": <portal item id>}

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

//Cloud Raster URI or Shared Data Path
inputMultidimensionalRaster={"uri": <cloud raster uri or shared data path>}
mode

(Required)

Specifies the method that will be used to perform principal component analysis.

  • DIMENSION_REDUCTION—The input time series data will be treated as a set of images. Principal components that extract prevalent patterns over time will be computed. This is the default.
  • SPATIAL_REDUCTION—The input time series data will be treated as a set of pixels. Principal components that extract prevalent patterns and locations over time will be computed as a set of one-dimensional arrays stored in a table.
Note:

When DIMENSION_REDUCTION is used, the output principal component is a raster, and the output loading is a table.

When SPATIAL_REDUCTION is used the output principal component is a table, and the output loading is a raster.

Syntax: A String value representing the mode.

Example

mode="DIMENSION_REDUCTION"
dimension

(Required)

The dimension name used to process the principal components.

Syntax: A string representing the dimension name.

Example

dimension="StdTime"
outputPrincipalComponentsName

(Required)

The name of the output raster or table.

When the mode parameter is specified as DIMENSION_REDUCTION, the output will be a multiband raster with the components as bands. The first band is the first principal component with the largest eigenvalue, the second band has the principal component with the second largest eigenvalue, and so on. The input can be the portal item ID, image service URL, or service properties of the raster.

When the mode parameter is specified as SPATIAL_REDUCTION, the output is a table containing a set of time series data representing the principal components.

Syntax: A JSON object that describes the name of the output principal components raster or table.

Example

outputPrincipalComponentsName={"serviceProperties": {"name":"output_principal_components"}}
outputLoadingsName

(Required)

The name of the output raster or table.

When the mode parameter is specified as DIMENSION_REDUCTION, the output will be a table containing the weights that each input raster contributed to the principal components. These weights define the correlations of the input data and the output principal components. You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter.

When the mode parameter is specified as SPATIAL_REDUCTION, the output is a raster in which pixel values are the weights contributing to the principal components. Pixels with larger values are more corelated to the principal components. This output may have a larger cell size than the input raster because a random reprojection is applied to reduce the computation complexity.

Syntax: A JSON object that describes the name of the output loadings raster or table.

Example

outputLoadingsName={"serviceProperties":{"name":"output_loadings"}}
outputEigenValuesTableName

The output eigenvalues table. Eigenvalues indicate the variance percentage of each component. They help define the number of principal components that are needed to represent the dataset.

You can specify the name, or you can create an empty service using Portal Admin Sharing API and use the return JSON object as input to this parameter.

Syntax: A String value representing the variable.

Example

outputEigenValuesTableName={"serviceProperties":{"name":"output_eigen_values_table"}}
variable

The variable of the input multidimensional raster used in computation. If the input raster is multidimensional and no variable is specified, only the first variable will be analyzed, by default.

Syntax: A string representing the variable.

Example

variable="250m 16 days evi"
numberOfPrincipalComponents

The number of principal components to compute, typically fewer than the number of input rasters or image bands.

This parameter also takes the form of percentage (%). For example, 90% means the number of components that can explain 90 percent of variance in the data will be computed.

Syntax: A String value representing the variable.

Example

numberOfPrincipalComponents="90"
context

(Optional)

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

  • Extent (extent)—A bounding box that defines the analysis area.
  • Output Spatial Reference (outSR)—The output raster will be projected into the output spatial reference.
  • Snap Raster (snapRaster)—The output raster will have its cells aligned with the specified snap raster.
  • Parallel Processing Factor (parallelProcessingFactor)—The specified number or percentage of processes will be used for the analysis.
  • Resampling Method (resamplingMethod)—Specifies the resampling method that will be used when creating the raster dataset for download.
    • NEAREST—The value of the closest cell will be used to assign a value to the output cell when resampling. This is the default.
    • BILINEAR—The new value of a cell will be based on a weighted distance average of the four nearest input cell centers.
    • CUBIC—The new value of a cell will be based on fitting a smooth curve through the 16 nearest input cell centers.

f

The response format. The default response format is html.

Values: html | json

Response

When you submit a request, the task 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 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:

To track the status of the job:

http://<analysis url>/MultidimensionalPrincipalComponents/jobs/<jobId>

Access results

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:

To access the output principal components:

http://<raster analysis url>/MultidimensionalPrincipalComponents/jobs/<jobId>/results/outputPrincipalComponentsName?token=<your token>&f=json

To access the output loadings table:

http://<raster analysis url>/MultidimensionalPrincipalComponents/jobs/<jobId>/results/outputLoadingsName?token=<your token>&f=json

To access the output eigenvalues table:

http://<raster analysis url>/MultidimensionalPrincipalComponents/jobs/<jobId>/results/outputEigenValuesName?token=<your token>&f=json