Skip To Content

Image To Map

  • URL:https:// <imageservice-url> /imageToMap
  • 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

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


//JSON structures
geometryType=<geometryType>&geometry={geometry}

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

Examples


//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

{"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:

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:

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


{
  "x": <x>,
  "y": <y>,
  "z": <z>, 
  "spatialReference": {
    <spatialReference>
  }
}

Multipoint syntax


{  
  "hasZ": <true|false>,
  "points": [
    [
      <x1>,
      <y1>,
      <z1>
    ],
    [
      <x2>,
      <y2>,
      <z2>
    ]
  ], 
  "spatialReference": {
    <spatialReference>
  }
}

Polyline syntax


{
  "hasZ": <true|false>,
  "paths": [
    [
      [<x11>, <y11>, <z11>],
      [<x1N>, <y1N>, <z1N>]
    ],
    [
      [<xk1>, <yk1>, <zk1>],
      [<xkM>, <ykM>, <zkM>]
    ]
  ],
  "spatialReference": {<spatialReference>}
}

Polygon syntax


{
  "hasZ": <true | false>,
  "rings": [
    [
      [<x11>, <y11>, <z11>],
      [<x1N>, <y1N>, <z1N>]
    ],
    [
      [<xk1>, <yk1>, <zk1>],
      [<xkM>, <ykM>, <zkM>]
    ]
  ],
  "spatialReference": {<spatialReference>}
}

JSON Response example


{
  "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
  }
}