Image To Map

URL:
https://<imageservice-url>/imageToMap
Methods:
GET
Required Capability:
Catalog
Version Introduced:
11.2

Description

The imageToMap operation converts the geometry on an image space to the map space.

Request parameters

ParameterDetails

rasterID

Specifies the objectID of the raster item. The input geometry parameter will use the image coordinate system of the specified raster item. Together, they will be reprojected to the outSR.

Example

1
rasterId=3

geometry

The input geometry. The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. In addition to the JSON structures, for envelopes and points, you can specify the geometry with a comma-separated syntax.

Syntax

1
2
3
4
5
//JSON structures
geometryType=<geometryType>&geometry={geometry}

//Point simple syntax
geometryType=esriGeometryPoint&geometry=<x>,<y>

Examples

1
2
//Point example
geometryType=esriGeometryPoint&geometry=-104,35.6

geometryType

The type of geometry specified by the geometry parameter. The geometry type can be point, multipoint, line, or polygon.

Values: esriGeometryPoint | esriGeometryMultipoint | esriGeometryPolyline | esriGeometryPolygon

outSR

(optional)

The spatial reference of the returned geometry.

options

(optional)

Supports DOff and Adjust keys. The DOff key is the depth offset value, and has a numeric value. DOff is introduced to resolve Z-fighting, setting the depth offset to that the geometries the user sketched can draw on top of mesh instead of burying inside of it. The Adjust key, when set to true, will adjust the "background" verticies to be in the foreground.

Syntax

1
{"DOff":<depth offset value>, "Adjust": <true/false>}

f

The response format. The default response format is html .

Values: html | json

Example usage

The following is a sample request URL for the imageToMap operation that will convert a point in the image space to the map space with a rasterID of 3:

1
2
3
https://machine.domain.com/webadaptor/rest/services/BrewertonTank_cloud/ImageServer/imageToMap?geometry={
"x": 2023.6464347103265,"y": -1857.2152406208425,"z":
88.08833}&geometryType=esriGeometryPoint&rasterId=3&outSR=&f=html

The following is a sample request URL for the imageToMap operation that will convert a polygon in the image space to the map space with a rasterID of 2:

1
https://machine.domain.com/webadaptor/rest/services/BrewertonTank_cloud/ImageServer/imageToMap?geometry={"rings":[[[2023,-1857,88],[1754,-1295,88],[2055,-1850,88],[1754,-1295,88],[2023,-1857,88]]]}&geometryType=esriGeometryPolygon&rasterId=2&outSR=&f=html

JSON Response syntax

Point syntax

1
2
3
4
5
6
7
8
{
  "x": <x>,
  "y": <y>,
  "z": <z>,
  "spatialReference": {
    <spatialReference>
  }
}

Multipoint syntax

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "hasZ": <true|false>,
  "points": [
    [
      <x1>,
      <y1>,
      <z1>
    ],
    [
      <x2>,
      <y2>,
      <z2>
    ]
  ],
  "spatialReference": {
    <spatialReference>
  }
}

Polyline syntax

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "hasZ": <true|false>,
  "paths": [
    [
      [<x11>, <y11>, <z11>],
      [<x1N>, <y1N>, <z1N>]
    ],
    [
      [<xk1>, <yk1>, <zk1>],
      [<xkM>, <ykM>, <zkM>]
    ]
  ],
  "spatialReference": {<spatialReference>}
}

Polygon syntax

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "hasZ": <true | false>,
  "rings": [
    [
      [<x11>, <y11>, <z11>],
      [<x1N>, <y1N>, <z1N>]
    ],
    [
      [<xk1>, <yk1>, <zk1>],
      [<xkM>, <ykM>, <zkM>]
    ]
  ],
  "spatialReference": {<spatialReference>}
}

JSON Response example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  "hasZ": true,
  "rings": [
    [
      [
        407323.1899714125,
        4787427.539874069,
        88.08833
      ],
      [
        407323.1900831836,
        4787478.54051566,
        88.08833
      ],
      [
        407324.1899733495,
        4787427.539886587,
        88.08833
      ],
      [
        407323.1900831836,
        4787478.54051566,
        88.08833
      ],
      [
        407323.1899714125,
        4787427.539874069,
        88.08833
      ]
    ]
  ],
  "spatialReference": {
    "wkid": 32618,
    "latestWkid": 32618,
    "vcsWkid": 115700,
    "latestVcsWkid": 115700
  }
}

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close