Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: ImageSpatialReference

require(["esri/ImageSpatialReference"], function(ImageSpatialReference) { /* code goes here */ });

Description

(Added at v3.14)

Defines the Image Coordinate System (ICS) for ImageServices. An ICS defines the spatial reference in terms of a primary image. A primary image displayed in its own image coordinate system exhibits no distortions; other images and features can be projected to overlap with the primary image using its image coordinate system.

Many imagery-centric workflows require displaying images in image coordinate systems instead of map coordinates (geographic or projected coordinate systems); for example, oblique images are distorted significantly when displayed in map coordinates but can be displayed nicely in a top-up view without distortions.

Samples

Search for samples that use this class.

Class hierarchy

esri/SpatialReference
|_esri/ImageSpatialReference

Constructors

NameSummary
new ImageSpatialReference(params)Creates an instance of ImageSpatialReference.

Properties

NameTypeSummary
icsObjectThe full Image Coordinate System, which includes transformations and map spatial reference information specific to each image.
icsidNumberThe OBJECTID of the image in a mosaic dataset.
wkidNumberThe well-known ID of a spatial reference.
wktStringThe well-known text that defines a spatial reference.

Methods

NameReturn typeSummary
equals(inSR, sr)BooleanTests whether the input image coordinate system equals the image coordinate system of the instance calling this method.
isWebMercator()BooleanReturns true if the wkid of the spatial reference object is one of the following values: 102113, 102100, 3857.
toJson(preserveUrl?)BooleanConverts the ImageSpatialReference instance to a JSON object.
Constructor Details

new ImageSpatialReference(params)

Creates an instance of ImageSpatialReference.
Parameters:
<Object> params Required Options that may be passed into the constructor. See the object specification table below.
params properties:
<Object> ics Optional The full Image Coordinate System object, which includes transformations and map spatial reference information specific to each image. If this option isn't specified, then icsid must be specified.
<Number> icsid Optional The OBJECTID of the image in a mosaic dataset. If this option isn't specified, then ics must be specified.
<String> url Required The url of the image service.
Property Details

<Object> ics

The full Image Coordinate System, which includes transformations and map spatial reference information specific to each image.

<Number> icsid

The OBJECTID of the image in a mosaic dataset.

<Number> wkid

The well-known ID of a spatial reference. See Projected Coordinate Systems and Geographic Coordinate Systems for the list of supported spatial references.

<String> wkt

The well-known text that defines a spatial reference. Many browser have a limit to the length of a GET request of approximately 2048 characters. When using well-known text to specify the spatial reference you can easily exceed this limit. In these cases, you will need to setup and use a proxy page.
Method Details

equals(inSR, sr)

Tests whether the input image coordinate system equals the image coordinate system of the instance calling this method.
Return type: Boolean
Parameters:
<ImageSpatialReference> inSR Required The ImageSpatialReference to test the equality against this instance.
<SpatialReference> sr Required The spatial reference to compare. 

isWebMercator()

Returns true if the wkid of the spatial reference object is one of the following values: 102113, 102100, 3857. (Added at v3.3)
Return type: Boolean
Sample:
require([
  "esri/SpatialReference", ... 
], function(SpatialReference, ... ) {
  var sr = new SpatialReference(102100);
  console.log(sr.isWebMercator()); // true
  ...
});

toJson(preserveUrl?)

Converts the ImageSpatialReference instance to a JSON object.
Return type: Boolean
Parameters:
<Boolean> preserveUrl Optional Indicates whether to preserve the URL in the output JSON object.
Show Modal