@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
840 lines (837 loc) • 84.3 kB
TypeScript
import type Extent from "../../geometry/Extent.js";
import type SpatialReference from "../../geometry/SpatialReference.js";
import type Field from "../support/Field.js";
import type FieldsIndex from "../support/FieldsIndex.js";
import type MosaicRule from "../support/MosaicRule.js";
import type MultidimensionalSubset from "../support/MultidimensionalSubset.js";
import type RasterFunction from "../support/RasterFunction.js";
import type RasterInfo from "../support/RasterInfo.js";
import type FeatureSet from "../../rest/support/FeatureSet.js";
import type FindImagesParameters from "../../rest/support/FindImagesParameters.js";
import type FindImagesResult from "../../rest/support/FindImagesResult.js";
import type ImageAngleParameters from "../../rest/support/ImageAngleParameters.js";
import type ImageAngleResult from "../../rest/support/ImageAngleResult.js";
import type ImageAreaParameters from "../../rest/support/ImageAreaParameters.js";
import type ImageAreaResult from "../../rest/support/ImageAreaResult.js";
import type ImageBoundaryParameters from "../../rest/support/ImageBoundaryParameters.js";
import type ImageBoundaryResult from "../../rest/support/ImageBoundaryResult.js";
import type ImageDistanceParameters from "../../rest/support/ImageDistanceParameters.js";
import type ImageDistanceResult from "../../rest/support/ImageDistanceResult.js";
import type ImageGPSInfoResult from "../../rest/support/ImageGPSInfoResult.js";
import type ImageHeightParameters from "../../rest/support/ImageHeightParameters.js";
import type ImageHeightResult from "../../rest/support/ImageHeightResult.js";
import type ImageHistogramParameters from "../../rest/support/ImageHistogramParameters.js";
import type ImageIdentifyParameters from "../../rest/support/ImageIdentifyParameters.js";
import type ImageIdentifyResult from "../../rest/support/ImageIdentifyResult.js";
import type ImagePixelLocationParameters from "../../rest/support/ImagePixelLocationParameters.js";
import type ImagePixelLocationResult from "../../rest/support/ImagePixelLocationResult.js";
import type ImagePointParameters from "../../rest/support/ImagePointParameters.js";
import type ImagePointResult from "../../rest/support/ImagePointResult.js";
import type ImageSampleParameters from "../../rest/support/ImageSampleParameters.js";
import type ImageSampleResult from "../../rest/support/ImageSampleResult.js";
import type ImageToMapMultirayParameters from "../../rest/support/ImageToMapMultirayParameters.js";
import type ImageToMapParameters from "../../rest/support/ImageToMapParameters.js";
import type ImageUrlParameters from "../../rest/support/ImageUrlParameters.js";
import type ImageUrlResult from "../../rest/support/ImageUrlResult.js";
import type ImageVolumeParameters from "../../rest/support/ImageVolumeParameters.js";
import type ImageVolumeResult from "../../rest/support/ImageVolumeResult.js";
import type MapToImageParameters from "../../rest/support/MapToImageParameters.js";
import type MeasureAreaFromImageResult from "../../rest/support/MeasureAreaFromImageResult.js";
import type MeasureFromImageParameters from "../../rest/support/MeasureFromImageParameters.js";
import type MeasureLengthFromImageResult from "../../rest/support/MeasureLengthFromImageResult.js";
import type { AbortOptions } from "../../core/promiseUtils.js";
import type { GeometryUnion } from "../../geometry/types.js";
import type { OperationCapabilities, QueryCapabilities } from "../types.js";
import type { DynamicFetchRasterOptions, RasterInterpolation, RasterNoDataInterpretation, RasterPixelType, RasterFormats, PixelData, RasterMultidimensionalInfo, ServiceRasterFunctionInfo } from "../raster/types.js";
import type { RasterFunctionProperties } from "../support/RasterFunction.js";
import type { RasterRendererUnion } from "../../renderers/support/raster/types.js";
import type { RequestOptions } from "../../request/types.js";
import type { ImageServiceStatisticsHistogramsResult, ImageServiceHistogramsResult } from "../../rest/imageService.js";
import type { FindImagesParametersProperties } from "../../rest/support/FindImagesParameters.js";
import type { ImageAngleParametersProperties } from "../../rest/support/ImageAngleParameters.js";
import type { ImageAreaParametersProperties } from "../../rest/support/ImageAreaParameters.js";
import type { ImageBoundaryParametersProperties } from "../../rest/support/ImageBoundaryParameters.js";
import type { ImageDistanceParametersProperties } from "../../rest/support/ImageDistanceParameters.js";
import type { ImageGPSInfoParametersProperties } from "../../rest/support/ImageGPSInfoParameters.js";
import type { ImageHeightParametersProperties } from "../../rest/support/ImageHeightParameters.js";
import type { ImageHistogramParametersProperties } from "../../rest/support/ImageHistogramParameters.js";
import type { ImageIdentifyParametersProperties } from "../../rest/support/ImageIdentifyParameters.js";
import type { ImagePixelLocationParametersProperties } from "../../rest/support/ImagePixelLocationParameters.js";
import type { ImagePointParametersProperties } from "../../rest/support/ImagePointParameters.js";
import type { ImageSampleParametersProperties } from "../../rest/support/ImageSampleParameters.js";
import type { ImageToMapMultirayParametersProperties } from "../../rest/support/ImageToMapMultirayParameters.js";
import type { ImageUrlParametersProperties } from "../../rest/support/ImageUrlParameters.js";
import type { ImageVolumeParametersProperties } from "../../rest/support/ImageVolumeParameters.js";
import type { MapToImageParametersProperties } from "../../rest/support/MapToImageParameters.js";
import type { QueryProperties } from "../../rest/support/Query.js";
import type { MosaicRuleProperties } from "../support/MosaicRule.js";
import type { MultidimensionalSubsetProperties } from "../support/MultidimensionalSubset.js";
import type { VectorFieldRendererProperties } from "../../renderers/VectorFieldRenderer.js";
import type { UniqueValueRendererProperties } from "../../renderers/UniqueValueRenderer.js";
import type { RasterStretchRendererProperties } from "../../renderers/RasterStretchRenderer.js";
import type { RasterShadedReliefRendererProperties } from "../../renderers/RasterShadedReliefRenderer.js";
import type { RasterColormapRendererProperties } from "../../renderers/RasterColormapRenderer.js";
import type { FlowRendererProperties } from "../../renderers/FlowRenderer.js";
import type { ClassBreaksRendererProperties } from "../../renderers/ClassBreaksRenderer.js";
import type { RasterInfoProperties } from "../support/RasterInfo.js";
export interface ArcGISImageServiceProperties extends Partial<Pick<ArcGISImageService, "bandIds" | "compressionQuality" | "compressionTolerance" | "copyright" | "definitionExpression" | "format" | "imageMaxHeight" | "imageMaxWidth" | "interpolation" | "noData" | "noDataInterpretation" | "pixelFilter" | "pixelType" | "sourceJSON" | "url">> {
/** Defines how overlapping images should be mosaicked. */
mosaicRule?: MosaicRuleProperties;
/**
* Represents a multidimensional subset of raster data. This includes subsets of both variables and dimensions. When the `multidimensionalSubset` is defined on
* a layer, the [MosaicRule.multidimensionalDefinition](https://developers.arcgis.com/javascript/latest/references/core/layers/support/MosaicRule/#multidimensionalDefinition) must be within the defined
* multidimensionalSubset, otherwise nothing will be displayed.
*
* @since 4.25
* @see [ImageryLayer - working with multidimensional raster data](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#multidimensionaldata)
* @see [Sample - Work with pixelFilter in an ImageryLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-pixelvalues/)
* @example
* // set a multi dimensional subset on the imagery layer
* // so that users can only access sea temperature data in the atlantic ocean
* // between April 7 - 18, 2014 and at depths between -500 - 0.
* const multidimensionalSubset = new MultidimensionalSubset({
* // area over atlantic ocean
* areaOfInterest: new Extent({
* type: "extent",
* xmax: 3041935.5384527617,
* xmin: -10166382.94922227,
* ymax: 12406741.274438996,
* ymin: -5908793.695137047,
* spatialReference: {
* wkid: 102100
* }
* }),
* subsetDefinitions: [
* {
* variableName: "water_temp",
* dimensionName: "StdTime",
* values: [1396828800000, 1397779200000], // 4/7 - 4/18
* isSlice: false
* },
* {
* variableName: "water_temp",
* dimensionName: "StdZ",
* values: [-500, 0],
* isSlice: false
* }
* ],
* });
* layer.multidimensionalSubset = multidimensionalSubset;
*/
multidimensionalSubset?: MultidimensionalSubsetProperties | null;
/**
* Specifies the rule for how the requested image should be processed. When rasterFunction applied, the server returns an updated service
* information that reflects a custom processing as defined by the raster function.
*
* Use helper functions from the [rasterFunctionUtils](https://developers.arcgis.com/javascript/latest/references/core/layers/support/rasterFunctionUtils/) module when creating raster functions that apply to ImageryLayers.
*
* @since 4.27
* @see [Raster functions - ArcGIS REST API](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm)
* @example
* // apply NDVI and colormap raster function to an imagery layer
* // use rasterFunctionUtils convenience methods to create raster functions
* const ndvi = rasterFunctionUtils.bandArithmeticNDVI({
* nirBandId: 4,
* redBandId: 3,
* scientificOutput: false
* });
*
* const colormap = rasterFunctionUtils.colormap({
* colorRampName: "NDVI3",
* raster: ndvi
* });
* layer.rasterFunction = colormap;
* @example
* const stretchFunction = new RasterFunction({
* functionName: "Stretch",
* functionArguments: {
* StretchType: 5, // (0 = None, 3 = StandardDeviation, 4 = Histogram Equalization, 5 = MinMax, 6 = PercentClip, 9 = Sigmoid)
* Min: 0,
* Max: 255,
* Raster: "$$" // $$(default) refers to the entire image service, $2 refers to the second image of the image service
* },
* outputPixelType: "u8"
* });
*
* const colorFunction = new RasterFunction({
* functionName: "Colormap",
* functionArguments: {
* ColorrampName: "Temperature", // other examples: "Slope", "Surface", "Blue Bright"....
* Raster: stretchFunction // chaining multiple raster functions
* }
* });
*
* const imageryLayer = new ImageryLayer({
* url:
* "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ScientificData/SeaTemperature/ImageServer"
* });
*
* imageryLayer.rasterFunction = colorFunction;
*/
rasterFunction?: RasterFunctionProperties | null;
/**
* Returns raster function information for the image services,
* including the name, description, help, function type, and a thumbnail of pre-configured raster function templates.
*
* @since 4.22
*/
rasterFunctionInfos?: ServiceRasterFunctionInfo[] | null;
/**
* The renderer assigned to the layer. The renderer defines how to visualize pixels in the imagery layer.
* Depending on the renderer type, the pixels may be [stretched](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterStretchRenderer/)
* across the color ramp, [classified](https://developers.arcgis.com/javascript/latest/references/core/renderers/ClassBreaksRenderer/),
* have [different symbols](https://developers.arcgis.com/javascript/latest/references/core/renderers/UniqueValueRenderer/) based on values, or show [shaded reliefs](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterShadedReliefRenderer/).
*
* If both renderer and [pixelFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#pixelFilter) is applied to an ImageryLayer then pixelFilter will override
* the renderer.
*
* > [!WARNING]
* >
* > **Known Limitations**
* >
* > Currently, the [VectorFieldRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/VectorFieldRenderer/) is not supported in 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
*
* @since 4.11
* @see [Sample - Intro to ImageryTileLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagerytilelayer/)
* @see [Sample - ImageryTileLayer - shaded relief renderer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-renderer/)
*/
renderer?: ((ClassBreaksRendererProperties & { type: "class-breaks" }) | (FlowRendererProperties & { type: "flow" }) | (RasterColormapRendererProperties & { type: "raster-colormap" }) | (RasterShadedReliefRendererProperties & { type: "raster-shaded-relief" }) | (RasterStretchRendererProperties & { type: "raster-stretch" }) | (UniqueValueRendererProperties & { type: "unique-value" }) | (VectorFieldRendererProperties & { type: "vector-field" })) | null;
/**
* Source raster information of the image service. The layer must be
* [ImageryLayer.loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#loaded) before serviceRasterInfo can be accessed.
*
* @since 4.12
* @see [Raster info](https://developers.arcgis.com/rest/services-reference/raster-info.htm)
*/
serviceRasterInfo?: RasterInfoProperties;
}
export type SourceType = "mosaic-dataset" | "raster-dataset";
/** ArcGISImageService is a mixin that adds a set of properties and methods for managing image services for [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/). */
export abstract class ArcGISImageService {
constructor(...args: any[]);
/**
* Defines a band combination using 0-based band indexes.
* Set the `bandIds` to the desired band when applying a [RasterStretchRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterStretchRenderer/) to the layer
* to get the correct result.
*
* @since 4.19
*/
accessor bandIds: number[] | null | undefined;
/**
* Describes the layer's supported capabilities.
*
* @since 4.16
*/
get capabilities(): ImageryLayerCapabilities;
/**
* The compression quality value. Controls how much loss the image will be subjected to by the compression algorithm.
* Valid value ranges of compression quality are from 0 to 100. Only valid when using `jpg` or `jpgpng` [image format](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#format).
*/
accessor compressionQuality: number | null | undefined;
/**
* Controls the tolerance of the lerc compression algorithm.
* The tolerance defines the maximum possible error of pixel values in the compressed image. It's a double value.
*
* @default 0.01
*/
accessor compressionTolerance: number;
/** The copyright text as defined by the service. */
accessor copyright: string | null | undefined;
/**
* Default mosaic rule of the image service.
*
* @since 4.28
*/
get defaultMosaicRule(): MosaicRule | null | undefined;
/**
* The SQL where clause used to filter rasters. Only the rasters that satisfy the definition
* expression are displayed in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). This property overrides
* the [mosaicRule's](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#mosaicRule) [MosaicRule.where](https://developers.arcgis.com/javascript/latest/references/core/layers/support/MosaicRule/#where)
* property if both properties are set on the layer.
*/
accessor definitionExpression: string | null | undefined;
/**
* An array of fields in the layer. Each field represents an attribute
* that may contain a value for each raster in the layer.
*
* @see [Mosaic dataset attribute table](https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/mosaic-dataset-attribute-table-pro-.htm)
*/
get fields(): Field[];
/**
* A convenient property that can be used to make case-insensitive lookups for a [field](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#fields) by name.
* This property is only available after the ImageryLayer has been [loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#loadStatus).
*
* @since 4.21
* @see [ImageryLayer.load()](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#load)
* @see [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#fields)
* @example
* // lookup a field by name, name is case-insensitive
* const fieldsIndex = layer.fieldsIndex.get("OBjecTID");
*
* // if there's a field by that name, print it to the console
* if (fieldsIndex) {
* console.log("fieldsIndex: ", fieldsIndex);
* }
*/
get fieldsIndex(): FieldsIndex<Field> | null | undefined;
/** The format of the exported image. */
accessor format: RasterFormats;
/**
* Indicates if the layer has [multidimensionalInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#multidimensionalInfo).
*
* @default false
*/
get hasMultidimensions(): boolean;
/**
* Indicates the maximum height of the image exported by the service.
*
* @default 4100
* @since 4.4
*/
accessor imageMaxHeight: number;
/**
* Indicates the maximum width of the image exported by the service.
*
* @default 4100
* @since 4.4
*/
accessor imageMaxWidth: number;
/**
* Defines how to interpolate pixel values.
*
* @since 4.12
*/
accessor interpolation: RasterInterpolation;
/** Defines how overlapping images should be mosaicked. */
get mosaicRule(): MosaicRule;
set mosaicRule(value: MosaicRuleProperties);
/**
* The multidimensional information associated with the layer if the layer's [hasMultidimensions](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#hasMultidimensions) property
* is `true`. If defined, multidimensional information contains data in multiple dimensions like time and depth/height, and contains multiple variables.
* Defining slices of particular dimensions in the layer is handled with the
* [MosaicRule.multidimensionalDefinition](https://developers.arcgis.com/javascript/latest/references/core/layers/support/MosaicRule/#multidimensionalDefinition) property of the [mosaicRule](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#mosaicRule).
*
* @see [ImageryLayer - working with multidimensional raster data](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#multidimensionaldata)
* @see [Sample - Work with pixelFilter in an ImageryLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-pixelvalues/)
*/
get multidimensionalInfo(): RasterMultidimensionalInfo | null | undefined;
/**
* Represents a multidimensional subset of raster data. This includes subsets of both variables and dimensions. When the `multidimensionalSubset` is defined on
* a layer, the [MosaicRule.multidimensionalDefinition](https://developers.arcgis.com/javascript/latest/references/core/layers/support/MosaicRule/#multidimensionalDefinition) must be within the defined
* multidimensionalSubset, otherwise nothing will be displayed.
*
* @since 4.25
* @see [ImageryLayer - working with multidimensional raster data](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#multidimensionaldata)
* @see [Sample - Work with pixelFilter in an ImageryLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-pixelvalues/)
* @example
* // set a multi dimensional subset on the imagery layer
* // so that users can only access sea temperature data in the atlantic ocean
* // between April 7 - 18, 2014 and at depths between -500 - 0.
* const multidimensionalSubset = new MultidimensionalSubset({
* // area over atlantic ocean
* areaOfInterest: new Extent({
* type: "extent",
* xmax: 3041935.5384527617,
* xmin: -10166382.94922227,
* ymax: 12406741.274438996,
* ymin: -5908793.695137047,
* spatialReference: {
* wkid: 102100
* }
* }),
* subsetDefinitions: [
* {
* variableName: "water_temp",
* dimensionName: "StdTime",
* values: [1396828800000, 1397779200000], // 4/7 - 4/18
* isSlice: false
* },
* {
* variableName: "water_temp",
* dimensionName: "StdZ",
* values: [-500, 0],
* isSlice: false
* }
* ],
* });
* layer.multidimensionalSubset = multidimensionalSubset;
*/
get multidimensionalSubset(): MultidimensionalSubset | null | undefined;
set multidimensionalSubset(value: MultidimensionalSubsetProperties | null | undefined);
/**
* The pixel value representing no available information.
* Can be a number (same value for all bands) or array (specific value for each band).
*
* @since 4.12
*/
accessor noData: number | number[] | null | undefined;
/**
* Interpretation of the [noData](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#noData) setting.
*
* Value | Description |
* ----- | ----------- |
* any | Pixel is transparent if any band matches `noData` value.
* all | Pixel is transparent only if all bands match `noData` value.
*
* @since 4.12
*/
accessor noDataInterpretation: RasterNoDataInterpretation | null | undefined;
/**
* The name of an `oid` [field](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#fields) containing
* a unique value or identifier for each raster in the layer.
*
* @see [fields](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#fields)
*/
get objectIdField(): string;
/**
* A function that processes [ImageryLayerView.pixelData](https://developers.arcgis.com/javascript/latest/references/core/views/layers/ImageryLayerView/#pixelData).
* The `pixelData` object contains a
* [PixelBlock](https://developers.arcgis.com/javascript/latest/references/core/layers/support/PixelBlock/) property that gives
* you access to all of the pixels in the raster on the client.
*
* Inside the `pixelFilter` you may loop through all the
* [PixelBlock.pixels](https://developers.arcgis.com/javascript/latest/references/core/layers/support/PixelBlock/#pixels) found in the
* `pixelBlock` property of the `pixelData` object and process them.
* This function may be used to hide some pixels from the view, alter their
* values, and change their color. The pixelFilter should be used when the imagery layer's
* [format](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#format) is `lerc` or `tiff` as these formats return raw pixel data to the client.
*
* @see [Sample - Pixel Filter](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-pixelvalues/)
* @example
* let layer = new ImageryLayer({
* url: // url to the image service
* pixelFilter: colorize // see the colorize() function below
* });
*
* // This function is applied to the pixelFilter property of the layer.
* // It takes the original value of each pixel and converts it to an RGB
* // representation to color the layer on a blue - red ramp. Blue pixels
* // represent low values and red pixels represent high values. View the sample
* // referenced above to see how this function works
*
* function colorize(pixelData) {
* // If there isn't pixelData, a pixelBlock, nor pixels, exit the function
* if (pixelData === null || pixelData.pixelBlock === null || pixelData.pixelBlock.pixels === null) {
* return;
* }
*
* // The pixelBlock stores the values of all pixels visible in the view
* let pixelBlock = pixelData.pixelBlock;
*
* // Get the min and max values of the data in the current view
* let minValue = pixelBlock.statistics[0].minValue;
* let maxValue = pixelBlock.statistics[0].maxValue;
*
* // The mask is an array that determines which pixels are visible to the client
* let mask = pixelBlock.mask;
*
* // The pixels visible in the view
* let pixels = pixelBlock.pixels;
*
* // The number of pixels in the pixelBlock
* let numPixels = pixelBlock.width * pixelBlock.height;
*
* // Calculate the factor by which to determine the red and blue
* // values in the colorized version of the layer
* let factor = 255.0 / (maxValue - minValue);
*
* // Get the pixels containing temperature values in the only band of the data
* let band1 = pixels[0];
*
* // Create empty arrays for each of the RGB bands to set on the pixelBlock
* let rBand = [];
* let gBand = [];
* let bBand = [];
*
* // Loop through all the pixels in the view
* for (i = 0; i < numPixels; i++) {
* // Get the pixel value recorded at the pixel location
* let tempValue = band1[i];
* // Calculate the red value based on the factor
* let red = (tempValue - minValue) * factor;
*
* // Sets a color between blue (lowest) and red (highest) in each band
* rBand[i] = red;
* gBand[i] = 0;
* bBand[i] = 255 - red;
* }
*
* // Set the new pixel values on the pixelBlock (now three bands)
* pixelData.pixelBlock.pixels = [rBand, gBand, bBand];
* pixelData.pixelBlock.pixelType = "u8"; // u8 is used for color
* }
*/
accessor pixelFilter: PixelFilterFunction | null | undefined;
/**
* Raster source pixel type.
*
* Value | Range of values that each cell can contain |
* ----- | ------------------------------------------- |
* unknown | Pixel type is unknown |
* s8 | -128 to 127 |
* s16 | -32768 to 32767 |
* s32 | -2147483648 to 2147483647 |
* u8 | 0 to 255 |
* u16 | 0 to 65535
* u32 | 0 to 4294967295
* f32 | -3.402823466e+38 to 3.402823466e+38
* f64 | 0 to 18446744073709551616
*/
accessor pixelType: RasterPixelType | null | undefined;
/**
* A complete list of fields that consists of raster attribute table fields, item pixel value, service pixel value, service pixel value with various server
* defined function templates, and raster attribute table fields. This list is used for layer's [ImageryLayer.popupTemplate](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#popupTemplate).
*
* It is essential in many imagery workflows to show pixel values and related categorical information (if applicable) in a popup.
* To meet this requirement, there're additional raster fields used in image service popups, representing pixel values and corresponding attributes
* if the service has additional rasterAttributeTable resource. These raster fields are prefixed with `Raster.` to indicate that they are special fields and avoid
* any potential conflict with fields from service info.
*
* <span id="pixel-values"></span>
* #### Pixel value fields
*
* Below is a list of raster fields that return different types of pixel values and their descriptions.
*
* <details>
* <summary>Read More</summary>
*
* ##### Service pixel value
* The `Raster.ServicePixelValue` field returns a pixel value at the identifying location, after dynamic mosaicking (if applicable) and processing is done using layer's current
* [mosaicRule](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#mosaicRule) and [rasterFunction](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#rasterFunction) settings. This field exists for all image services. The server side dynamic mosaicking process is only applicable
* if the service is published from a mosaic dataset.
*
* ##### Raw service pixel value
* The `Raster.ServicePixelValue.Raw` field returns a pixel value at the identifying location, after dynamic mosaicking (if applicable) but without further processing. It uses layer's
* current [mosaicRule](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#mosaicRule) and `None` [raster function](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#rasterFunction). This field only exists if the image service info has `allowRasterFunction: true`, and has a `None` entry
* in `rasterFunctionInfos`.
*
* ##### Service pixel value from server side raster functions
* The `Raster.ServicePixelValue.RFTNAME` field returns a pixel value at the identifying location, after dynamic mosaicking (if applicable) and processing using any predefined sever side
* raster function. The list of available functions is defined by `rasterFunctionInfos` in image service root resource, except `None` function, which is already mapped
* as Raw Service Pixel Value. This field only exists if the image service info has `allowRasterFunction: true`.
*
* ##### Item pixel value
* The `Raster.ItemPixelValue` field returns a pixel value representing pixel values of each of the individual images in the image service. This is only applicable to image services published
* from a mosaic dataset. It can be retrieved from the image service using either the [identify()](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#identify) or the [getSamples()](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#getSamples) method.
*
* For example, for a service published from a mosaic dataset with the following raster functions:
*
* ```js
* rasterFunctionInfos": [
* { "name": "None", "description": "", "help": ""},
* { "name": "EVI", "description": "", "help": ""}],
* { "name": "VI", "description": "", "help": ""}
* ]
* ```
*
* You can have the following additional raster fields: `Raster.ServicePixelValue`, `Raster.ServicePixelValue.Raw`, `Raster.ServicePixelValue.EVI`, `Raster.ServicePixelValue.VI` and
* `Raster.ItemPixelValue`.
*
* Pixel value fields support formatting. Since an image service can have multiple bands, pixel value represents multiple bands, and shouldn't be assumed as a single number.
* This needs to be considered when formatting values.
*
* ##### Categorical attributes fields for pixel value
* When working with categorical data (e.g. Land Cover data), image service info may have an associated `rasterAttributeTable` resource, indicated in root resource via
* the `hasRasterAttributeTable` flag. A raster attribute table always has a `Value` field, and each record in the table represents a pixel value mapping to associated categorical
* fields, such as the ClassName (`Raster.ClassName`), Count (`Raster.Count`) or color representation (`Raster.Red`, `Raster.Green` and `Raster.Blue`) fields of the value.
*
* ##### Vector fields
* The `Raster.Magnitude` and `Raster.Direction` fields return magnitude and direction values from a multidimensional dataset with a vector field.
*
* </details>
*
* @example
* layer.when(() => {
* // print out field names returned in layer.rasterFields
* layer.rasterFields.forEach((field) => {
* console.log(field.name);
* });
* });
*/
get rasterFields(): Field[];
/**
* Specifies the rule for how the requested image should be processed. When rasterFunction applied, the server returns an updated service
* information that reflects a custom processing as defined by the raster function.
*
* Use helper functions from the [rasterFunctionUtils](https://developers.arcgis.com/javascript/latest/references/core/layers/support/rasterFunctionUtils/) module when creating raster functions that apply to ImageryLayers.
*
* @since 4.27
* @see [Raster functions - ArcGIS REST API](https://developers.arcgis.com/documentation/common-data-types/raster-function-objects.htm)
* @example
* // apply NDVI and colormap raster function to an imagery layer
* // use rasterFunctionUtils convenience methods to create raster functions
* const ndvi = rasterFunctionUtils.bandArithmeticNDVI({
* nirBandId: 4,
* redBandId: 3,
* scientificOutput: false
* });
*
* const colormap = rasterFunctionUtils.colormap({
* colorRampName: "NDVI3",
* raster: ndvi
* });
* layer.rasterFunction = colormap;
* @example
* const stretchFunction = new RasterFunction({
* functionName: "Stretch",
* functionArguments: {
* StretchType: 5, // (0 = None, 3 = StandardDeviation, 4 = Histogram Equalization, 5 = MinMax, 6 = PercentClip, 9 = Sigmoid)
* Min: 0,
* Max: 255,
* Raster: "$$" // $$(default) refers to the entire image service, $2 refers to the second image of the image service
* },
* outputPixelType: "u8"
* });
*
* const colorFunction = new RasterFunction({
* functionName: "Colormap",
* functionArguments: {
* ColorrampName: "Temperature", // other examples: "Slope", "Surface", "Blue Bright"....
* Raster: stretchFunction // chaining multiple raster functions
* }
* });
*
* const imageryLayer = new ImageryLayer({
* url:
* "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ScientificData/SeaTemperature/ImageServer"
* });
*
* imageryLayer.rasterFunction = colorFunction;
*/
get rasterFunction(): RasterFunction | null | undefined;
set rasterFunction(value: RasterFunctionProperties | null | undefined);
/**
* Returns raster function information for the image services,
* including the name, description, help, function type, and a thumbnail of pre-configured raster function templates.
*
* @since 4.22
*/
get rasterFunctionInfos(): ServiceRasterFunctionInfo[] | null | undefined;
/**
* The renderer assigned to the layer. The renderer defines how to visualize pixels in the imagery layer.
* Depending on the renderer type, the pixels may be [stretched](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterStretchRenderer/)
* across the color ramp, [classified](https://developers.arcgis.com/javascript/latest/references/core/renderers/ClassBreaksRenderer/),
* have [different symbols](https://developers.arcgis.com/javascript/latest/references/core/renderers/UniqueValueRenderer/) based on values, or show [shaded reliefs](https://developers.arcgis.com/javascript/latest/references/core/renderers/RasterShadedReliefRenderer/).
*
* If both renderer and [pixelFilter](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#pixelFilter) is applied to an ImageryLayer then pixelFilter will override
* the renderer.
*
* > [!WARNING]
* >
* > **Known Limitations**
* >
* > Currently, the [VectorFieldRenderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/VectorFieldRenderer/) is not supported in 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
*
* @since 4.11
* @see [Sample - Intro to ImageryTileLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagerytilelayer/)
* @see [Sample - ImageryTileLayer - shaded relief renderer](https://developers.arcgis.com/javascript/latest/sample-code/layers-imagery-renderer/)
*/
get renderer(): RasterRendererUnion | null | undefined;
set renderer(value: ((ClassBreaksRendererProperties & { type: "class-breaks" }) | (FlowRendererProperties & { type: "flow" }) | (RasterColormapRendererProperties & { type: "raster-colormap" }) | (RasterShadedReliefRendererProperties & { type: "raster-shaded-relief" }) | (RasterStretchRendererProperties & { type: "raster-stretch" }) | (UniqueValueRendererProperties & { type: "unique-value" }) | (VectorFieldRendererProperties & { type: "vector-field" })) | null | undefined);
/**
* Source raster information of the image service. The layer must be
* [ImageryLayer.loaded](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#loaded) before serviceRasterInfo can be accessed.
*
* @since 4.12
* @see [Raster info](https://developers.arcgis.com/rest/services-reference/raster-info.htm)
*/
get serviceRasterInfo(): RasterInfo;
/**
* The [image service's metadata JSON](https://developers.arcgis.com/rest/services-reference/image-service.htm)
* exposed by the ArcGIS REST API. While most commonly used properties
* are exposed on the ImageryLayer class directly, this property gives access to all information returned
* by the image service. This property is useful if working in an application built using an older version of the API
* which requires access to image service properties from a more recent version.
*
* @since 4.13
*/
accessor sourceJSON: any;
/**
* Image service data source type.
*
* @since 4.28
*/
get sourceType(): SourceType;
/** The spatial reference of the image service. */
get spatialReference(): SpatialReference;
/**
* The URL to the REST endpoint of the layer. The URL may either point
* to a resource on ArcGIS Enterprise or ArcGIS Online.
*
* @example
* // This url must point to an Image Service
* let layer = new ImageryLayer({
* url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/CharlotteLAS/ImageServer"
* });
*/
accessor url: string | null | undefined;
/**
* The version of ArcGIS Server in which the image service is published.
*
* @example
* // Prints the version number to the console - e.g. 10.91, 11.2, 11.3
* console.log(layer.version);
*/
get version(): number;
/**
* Calculates volume on the elevation data for the specified [ImageVolumeParameters.mosaicRule](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageVolumeParameters/#mosaicRule), base surface type
* and [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) or [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/) geometries.
* If no [mosaic rule](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageHistogramParameters/#mosaicRule) is provided, the default mosaic rule from the layer will be applied.
*
* @param parameters - Specifies parameters for calculating volume.
* @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request
* (will override requestOptions defined during construction).
* @returns When resolved, [ImageVolumeResult](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageVolumeResult/) is returned
* containing an array of [ImageVolume](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageVolume/).
* @since 4.32
* @see [ArcGIS REST API - Compute Pixel Location](https://developers.arcgis.com/rest/services-reference/enterprise/calculate-volume)
* @example
* const params = new ImageVolumeParameters({
* geometries: [
* new Extent({
* xmin: 1450000,
* ymin: 540000,
* xmax: 1451000,
* ymax: 541000,
* spatialReference: new SpatialReference({ wkid: 2264 })
* }),
* new Extent({
* xmin: 1450500,
* ymin: 540000,
* xmax: 1451000,
* ymax: 541000,
* spatialReference: new SpatialReference({ wkid: 2264 })
* })],
* constantZ: 1,
* baseType: "constant"
* });
*
* layer.calculateVolume(params).then((result) => {
* // use the returned result
* console.log(result);
* });
*/
calculateVolume(parameters: ImageVolumeParameters | ImageVolumeParametersProperties, requestOptions?: RequestOptions): Promise<ImageVolumeResult>;
/**
* Computes the rotation angle of a ImageryLayer at a given location.
* This operation is supported at 10.9.1 and later.
*
* @param parameters - Specifies parameters for computing angles.
* @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request
* (will override requestOptions defined during construction).
* @returns When resolved, returns an instance of [ImageAngleResult](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageAngleResult/)
* containing computed north and up angles.
* @since 4.22
* @see [ArcGIS REST API - Compute Angles](https://developers.arcgis.com/rest/services-reference/enterprise/compute-angles.htm)
*/
computeAngles(parameters: ImageAngleParameters | ImageAngleParametersProperties, requestOptions?: RequestOptions): Promise<ImageAngleResult>;
/**
* Computes histograms based on the provided [ImageHistogramParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageHistogramParameters/).
* If a [raster function](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageHistogramParameters/#rasterFunction) and
* a [mosaic rule](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageHistogramParameters/#mosaicRule) are not specified, the current settings on the layer will be used.
* This operation is supported by an image service published with a mosaic dataset or a raster dataset at ArcGIS Server 10.4 and later.
* The result of this operation contains histograms computed for the given extent.
*
* @param parameters - Specifies parameters for computing histograms.
* @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request
* (will override requestOptions defined during construction).
* @returns Resolves to an object containing histogram results.
* See the object specification table below for details.
*
* Property | Type | Description
* ---------|------|-------------
* histograms[] | [RasterHistogram](https://developers.arcgis.com/javascript/latest/references/core/layers/raster/types/#RasterHistogram) | Result containing raster histograms.
* @since 4.18
* @example
* // set the pixel size parameter to match the current
* // resolution of the view and spatial reference
* let pixelSize = {
* x:view.resolution,
* y:view.resolution,
* spatialReference: {
* wkid: view.spatialReference.wkid
* }
* }
* // set the histogram parameters to request
* // data for the current view extent and resolution
* let params = new ImageHistogramParameters({
* geometry: view.extent,
* pixelSize: pixelSize
* });
*
* // request for histograms for the specified parameters
* layer.computeHistograms(params).then(function(results){
* // results are returned and process it as needed.
* console.log("histograms and stats", results);
* })
* .catch(function(err){
* console.log("err", err)
* });
*/
computeHistograms(parameters: ImageHistogramParameters | ImageHistogramParametersProperties, requestOptions?: RequestOptions): Promise<ImageServiceHistogramsResult>;
/**
* Computes the corresponding pixel location in columns and rows for an image based on input geometry.
* Requires that the raster catalog item has a valid `icsToPixel` resource.
*
* @param parameters - Specifies parameters for computing image space pixel location.
* @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request
* (will override requestOptions defined during construction).
* @returns When resolved, returns an instance of
* [ImagePixelLocationResult](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImagePixelLocationResult/) containing x and y values for the column and row of each input geometry.
* @since 4.22
* @see [ArcGIS REST API - Compute Pixel Location](https://developers.arcgis.com/rest/services-reference/enterprise/compute-pixel-location.htm)
*/
computePixelSpaceLocations(parameters: ImagePixelLocationParameters | ImagePixelLocationParametersProperties, requestOptions?: RequestOptions): Promise<ImagePixelLocationResult>;
/**
* Computes [statistics](https://developers.arcgis.com/javascript/latest/references/core/layers/raster/types/#RasterBandStatistics) and [histograms](https://developers.arcgis.com/javascript/latest/references/core/layers/raster/types/#RasterHistogram)
* for the provided [ImageHistogramParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageHistogramParameters/).
* If a [raster function](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageHistogramParameters/#rasterFunction) and a
* [mosaic rule](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageHistogramParameters/#mosaicRule) are not specified, the current settings on the layer will be used.
* This operation is supported by an image service published with a mosaic dataset or a raster dataset at ArcGIS Server 10.4 and later.
*
* The result of this operation contains both statistics and histograms computed for the given extent or polygon.
* Note that the given extent or polygon is first projected to the spatial reference of the service, then the source pixels are requested at the specified
* resolution for the projected geometry's extent. The statistics and histogram are then computed based on the source pixel's values.
*
* @param parameters - Specifies parameters for computing statistics and histograms.
* @param requestOptions - Additional [options](https://developers.arcgis.com/javascript/latest/references/core/request/#request) to be used for the data request
* (will override requestOptions defined during construction).
* @returns Resolves to an object containing histogram and statistics results.
* See the object specification table below for details.
*
* Property | Type | Description
* ---------|------|-------------
* histograms[] | [RasterHistogram](https://developers.arcgis.com/javascript/latest/references/core/layers/raster/types/#RasterHistogram) | Result containing raster histograms.
* bandStatistics[] | [RasterBandStatistics](https://developers.arcgis.com/javascript/latest/references/core/layers/raster/types/#RasterBandStatistics) | Raster band statistics.
* @since 4.18
* @example
* // set the pixel size parameter to match the current
* // resolution of the view and spatial reference
* let pixelSize = {
* x:view.resolution,
* y:view.resolution,
* spatialReference: {
* wkid: view.spatialReference.wkid
* }
* }
* // set the histogram parameters to request
* // data for the current view extent and resolution
* let params = new ImageHistogramParameters({
* geometry: view.extent,
* pixelSize: pixelSize
* });
*
* // request for histograms and statistics for the specified parameters
* layer.computeStatisticsHistograms(params).then(function(results){
* // results are returned and process it as needed.
* console.log("histograms and stats", results);
* })
* .catch(function(err){
* console.log("err", err)
* });
*/
computeStatisticsHistograms(parameters: ImageHistogramParameters | ImageHistogramParametersProperties, requestOptions?: RequestOptions): Promise<ImageServiceStatisticsHistogramsResult>;
/**
* Fetches raw pixel data for a specified extent, width, and height, preserving full pixel depth and including all bands without applying renderer to the layer.
* The operation uses the following layer properties: [mosaicRule](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#mosaicRule), [rasterFunction](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#rasterFunction), [compressionTolerance](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#compressionTolerance),
* [definitionExpression](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#definitionExpression), [noData](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#noData), [noDataInterpretation](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageService/#noDataInterpretation), and [multidimensionalSubset](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/ArcGISImageSer