tjbnc

REST API Map Image Export and Scale Dependency

Discussion created by tjbnc on Jun 23, 2010
Latest reply on Jul 8, 2010 by a.schaefer-esri-de-esridist
I have been able to documented unexpected (for me) behavior regarding scale dependency and the map export method of the REST API.

I have 3 map services on an ArcGIS Server (I am not the administrator so I cannot access it).
Tiled Imagery
Tiled Thematic
Dynamic Thematic

Scale dependency of all 3 layers is respected in a map control.
When I produce a map image of the service using the REST export method, scale dependency is respected for the Tiled and Dynamic Thematic Services.  But scale dependency is not fully respected for the Tiled Imagery service.

The REST call to the service (omitting http:):

<server>/ArcGIS/rest/services/Imagery3/MapServer/

produces:

Imagery3 (MapServer)
View In:   ArcMap   ArcGIS Explorer   ArcGIS JavaScript   Google Earth

View Footprint In:   Google Earth

Service Description:

Map Name: Layers2

Layers:
.
.
.
Description:

Copyright Text:

Spatial Reference: 2264

Single Fused Map Cache: true

Tile Info:


Height: 512

Width: 512

DPI: 96

Levels of Detail: (# Levels: 4)

Level ID: 0 [Start Tile, End Tile]
Resolution: 28.25
Scale: 32544
Level ID: 1 [Start Tile, End Tile]
Resolution: 13.0208333333333
Scale: 15000
Level ID: 2 [Start Tile, End Tile]
Resolution: 6.51041666666667
Scale: 7500
Level ID: 3 [Start Tile, End Tile]
Resolution: 1.73611111111111
Scale: 2000
Format: JPEG
Compression Quality: 75
Origin:
X: -121841900
Y: 154024800

Spatial Reference: 2264
Intial Extent:

XMin: 1837306.32463124
YMin: 370328.619961146
XMax: 1861403.57463124
YMax: 393465.369961146
Spatial Reference: 2264

Full Extent:

XMin: 267000.005956989
YMin: -20998.7395168134
XMax: 3192999.8740899
YMax: 1100997.84466795
Spatial Reference: 2264

Units: esriFeet

Supported Image Format Types: PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI


I don't expect to see image data with a scale value greater than 32544.  Again in a map control, I do not.

===
When I call the REST map export method:
<server>/ArcGIS/rest/services/Imagery3/MapServer/export?f=pjson&bbox=1648619.791666668,490746.52777777775,1811380.208333335,599253.4722222222&size=700,400&transparent=true&format=jpg&layers=show:0,1,2,3,4,5,6,7&layerDefs=

I get the following PJSON
{
  "href" : "http://<server>/arcgisoutput/_ags_map4a786ff41f0a487eb3713316aa17e2ea.jpg",
  "width" : 700,
  "height" : 400,
  "extent" : {
    "xmin" : 1635056.42361111,
    "ymin" : 490746.527777778,
    "xmax" : 1824943.57638889,
    "ymax" : 599253.472222222,
    "spatialReference" : {
      "wkid" : 2264
    }
  },
  "scale" : 312500
}

Note the scale.

When I change f=pjson to f=image, I get an image of the tiled data.

As I zoom in, I continue to get an image result. 

But if I zoom out, say to where scale is "1250000", I no longer get the image.  So it is partially respecting scale dependency.

I cannot tell if this is a bug in the REST API, or a server setting I can't see on the returned PJSON.

Any suggestions would be greatly appreciated.

TJ

Outcomes