Using GET_SERVICE_INFO and SERVICEINFO with ArcMap Image Services

Introduction

GET_SERVICE_INFO is a request for accessing information about an ArcMap Image Service such as the environment, properties, layer, and dataframe information. This information is returned in a SERVICEINFO response. This document covers ArcMap Image Services. For information regarding Feature and Image Services, see Using GET_SERVICE_INFO and SERVICEINFO with Image Services.

ArcMap Image Services are created using ArcMap. The map document generated in ArcMap is the input to an ArcMap Image Service. All information about layer rendering is contained in the map document and is not included in the SERVICEINFO response. Also, because no information about geocode and extract extensions are included in a map document, GET_GEOCODE and GET_EXTRACT requests cannot be made to an ArcMap Image Service, and no extension information is included in a SERVICEINFO response. The following information from an ArcMap map document is used for the GET_SERVICE_INFO examples in this document. The document consists of two layers from the ESRIDATA data set. The following table summarizes the layer names, file name, file type, and layer ID number.

Layer NameShapefile NameData TypeLayer ID
CountriesCNTRY94Polygon0
BackgroundWORLD_IMG.gifImage1

The Background layer is an image of the world. The Countries layer contains the country boundaries. The map in the following figure is example output using this service.

Default Image

GET_SERVICE_INFO Framework

A GET_SERVICE_INFO request requires only the GET_SERVICE_INFO element as shown in the example below.

GET_SERVICE_INFO request
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_SERVICE_INFO />
  </REQUEST>
</ARCXML>

SERVICEINFO Framework

Depending on which attributes are used with GET_SERVICE_INFO, all or a subset of information about the ArcMap Image Service is returned in SERVICEINFO. Based on the above request on the sample service, the following example shows the SERVICEINFO response.

SERVICEINFO response
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <RESPONSE>
    <SERVICEINFO>
      <ENVIRONMENT>
        <LOCALE language="en" country="US"/>
        <UIFONT name="Arial" color="0,0,0" size="12" style="regular"/>
        <SEPARATORS cs=" " ts=";"/>
        <SCREEN dpi="96"/>
        <IMAGELIMIT pixelcount="1048576"/>
        <CAPABILITIES forbidden="" disabledtypes="" servertype="arcmapserver" returngeometry="xmlmode"/>
      </ENVIRONMENT>
      <LAYOUTINFO pageunits="inches">
        <ENVELOPE minx="0" miny="0" maxx="8.5" maxy="11" />
      </LAYOUTINFO>
      <PROPERTIES>
        <FEATURECOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <FILTERCOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <MAPUNITS units="decimal_degrees"/>
        <BACKGROUND color="255,255,255"/>
        <ENVELOPE minx="-178.637433658708" miny="-149.932588181915" maxx="180.202305702247" maxy="148.932531819555" name="Initial_Extent" />
      </PROPERTIES>
      <LAYERINFO type="image" name="Background" id="1" visible="true">
        <ENVELOPE minx="-180.10415" miny="-89.8896767396583" maxx="179.900453479317" maxy="90.112625" />
      </LAYERINFO>
      <LAYERINFO type="featureclass" name="Countries" id="0" visible="true">
        <FCLASS type="polygon">
          <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="83.5960388183594" />
          <FIELD name="#ID#" type="-99" size="4" precision="0" />
          <FIELD name="#SHAPE#" type="-98" size="0" precision="0" />
          <FIELD name="AREA" type="8" size="12" precision="11" />
          <FIELD name="NAME" type="12" size="40" precision="0" />
          <FIELD name="ABBREVNAME" type="12" size="12" precision="0" />
          <FIELD name="FIPS_CODE" type="12" size="2" precision="0" />
          <FIELD name="WB_CNTRY" type="12" size="3" precision="0" />
        </FCLASS>
      </LAYERINFO>
    </SERVICEINFO>
  </RESPONSE>
</ARCXML>

This SERVICEINFO response is divided into four sections: ENVIRONMENT, LAYOUTINFO, PROPERTIES, and LAYERINFO. A fifth child element, DATAFRAMEINFO, is discussed in a later section.

ENVIRONMENT

With ArcMap Images Services, the Spatial Server assigns ENVIRONMENT values. LOCALE is set to the system default locale. UIFONT is set to "Arial". For SEPARATORS, the default for cs (coordinate separator) and ts (tuple separator) are a space and semicolon, respectively. For SCREEN, the default value for dpi is "96" or the value used for dpi in GET_SERVICE_INFO.

IMAGELIMIT is always included and is set when an ArcMap Image Service is started. By default, an image is limited in size to 4 MB, which corresponds to 1,048,576 pixels. Changes can be made to the image size and pixel count using the ArcIMS Administrator. For more information, see ArcIMS Help. The attribute pixelcount reports the pixel count from the ArcIMS Administrator, but it cannot be changed using GET_SERVICE_INFO.

CAPABILITIES attributes provide information on restrictions to ArcIMS services. The attribute forbidden provides a list of forbidden elements in the access control list (ACL). The ACL file is used for user authentication to grant users access to specific ArcIMS services. One way to limit access is to forbid one or more of the requests: GET_FEATURES, GET_IMAGE, GET_SERVICE_INFO, GET_LAYOUT, or GET_RASTER_INFO. For more information on forbidden elements, see ArcIMS Help.

The attribute disabledtypes provides a list of forbidden image output types designated in the spatialServer.ForbiddenImageTypes property in esrimap_prop. For more information on the location of esrimap_prop and its properties, see ArcIMS Help.

The attribute servertype is included and assigned the value of "arcmapserver" for all ArcMap Image Services.

In the example below, forbidden in CAPABILITIES is set to GET_LAYOUT. This means no requests with GET_LAYOUT are processed. The attribute disabledtypes is set to "bmp". This means that if an image is requested in BMP format, this format is denied. Instead, the image reverts to the format designated when the service was started. Since the service is an ArcMap Image Service, the servertype attribute is included, and the value is "arcmapserver". The returngeometry attribute is set to "xmlmode". This means that geometry will be returned if a GET_FEATURES request uses outputmode of "xml" or "newxml" but will not return geometry when outputmode is "binary".

ENVIRONMENT and its child elements
<ENVIRONMENT>
  <LOCALE language="en" country="US" />
  <UIFONT name="Arial" color="0,0,0" size="12" style="regular" />
  <SEPARATORS cs=" " ts=";"/>
  <SCREEN dpi="96"/>
  <IMAGELIMIT pixelcount="1048576" />
  <CAPABILITIES forbidden="GET_LAYOUT" disabledtypes="BMP" servertype="arcmapserver" returngeometry="xmlmode"/>
</ENVIRONMENT>

The CAPABILITIES restrictions apply only when the ArcIMS Servlet Connector is used. They do not apply to the ActiveX, ColdFusion, or Java Connectors, or to the .NET Link.

LAYOUTINFO

LAYOUTINFO in SERVICEINFO provides the initial envelope and units for an ArcMap Image Service layout. The coordinates for ENVELOPE are in page units of the layout rather than map units. Note that this ENVELOPE is the first one in the SERVICEINFO response. Prior to ArcIMS 4, the first ENVELOPE was in the PROPERTIES section. Its coordinates were in map units, and it contained the initial extent of the service. When determining the initial extent in the service, be sure you are parsing the correct ENVELOPE - the ENVELOPE in the PROPERTIES section.

LAYOUTINFO and its child elements
<LAYOUTINFO pageunits="inches">
  <ENVELOPE minx="0" miny="0" maxx="8.5" maxy="11" />
</LAYOUTINFO>

PROPERTIES

The PROPERTIES section in SERVICEINFO returns properties of an ArcMap Image Service. The ENVELOPE is the initial extent for the service and is always included. All other child elements are optional in a service and are included in the SERVICEINFO response only when included in the service. Optional child elements include FEATURECOORDSYS, FILTERCOORDSYS, MAPUNITS, and BACKGROUND.

PROPERTIES and its child elements
<PROPERTIES>
  <FEATURECOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
  <FILTERCOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
  <MAPUNITS units="decimal_degrees"/>
  <BACKGROUND color="255,255,255"/>
  <ENVELOPE minx="-178.637433658708" miny="-149.932588181915" maxx="180.202305702247" maxy="148.932531819555" name="Initial_Extent" />
</PROPERTIES>

LAYERINFO

LAYERINFO describes the layer information in a service and includes the layer type, name of the layer, whether the layer is visible, the layer ID, and the minimum and maximum scales at which the layer can be displayed. All these parameters are defined in the ArcMap map document.

There are two LAYERINFO types: The following example shows the two layer types with the minimum returned information.

LAYERINFO and minimum returned information
<LAYERINFO type="image" name="Background" id="1" visible="true">
</LAYERINFO>
<LAYERINFO type="featureclass" name="Countries" id="0" visible="true">
  <FCLASS type="polygon"></FCLASS>
</LAYERINFO>

GET_SERVICE_INFO Attributes

GET_SERVICE_INFO has six optional attributes.

Envelope attribute

In the following example, envelope is set to "true".

GET_SERVICE_INFO request using envelope
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_SERVICE_INFO envelope="true" fields="false" />
  </REQUEST>
</ARCXML>

In the response, an ENVELOPE is included for each layer. This is in addition to the ENVELOPE in the PROPERTIES and LAYOUTINFO sections. Remember that the envelope in the LAYOUTINFO section is in page units. All other envelopes are in map units.

SERVICEINFO response with ENVELOPE
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <RESPONSE>
    <SERVICEINFO>
      <ENVIRONMENT>
        <LOCALE language="en" country="US"/>
        <UIFONT name="Arial" color="0,0,0" size="12" style="regular"/>
        <SEPARATORS cs=" " ts=";"/>
        <SCREEN dpi="96"/>
        <IMAGELIMIT pixelcount="1048576"/>
        <CAPABILITIES forbidden="" disabledtypes="" servertype="arcmapserver" returngeometry="xmlmode"/>
      </ENVIRONMENT>
      <LAYOUTINFO pageunits="inches">
        <ENVELOPE minx="0" miny="0" maxx="8.5" maxy="11" />
      </LAYOUTINFO>
      <PROPERTIES>
        <FEATURECOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <FILTERCOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <MAPUNITS units="decimal_degrees"/>
        <BACKGROUND color="255,255,255"/>
        <ENVELOPE minx="-178.637433658708" miny="-149.932588181915" maxx="180.202305702247" maxy="148.932531819555" name="Initial_Extent" />
      </PROPERTIES>
      <LAYERINFO type="image" name="Background" id="1" visible="true">
        <ENVELOPE minx="-180.10415" miny="-89.8896767396583" maxx="179.900453479317" maxy="90.112625" />
      </LAYERINFO>
      <LAYERINFO type="featureclass" name="Countries" id="0" visible="true">
        <FCLASS type="polygon">
          <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="83.5960388183594" />
        </FCLASS>
      </LAYERINFO>
    </SERVICEINFO>
  </RESPONSE>
</ARCXML>

Fields attribute

In the next example, fields is set to "true".

GET_SERVICE_INFO request with fields
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_SERVICE_INFO envelope="false" fields="true" />
  </REQUEST>
</ARCXML>

In the response, fields for all featureclass layers are returned in FIELD. In the example below, the response includes FIELD information for the Countries featureclass layer.

SERVICEINFO response with FIELD
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <RESPONSE>
    <SERVICEINFO>
      <ENVIRONMENT>
        <LOCALE language="en" country="US"/>
        <UIFONT name="Arial" color="0,0,0" size="12" style="regular"/>
        <SEPARATORS cs=" " ts=";"/>
        <SCREEN dpi="96"/>
        <IMAGELIMIT pixelcount="1048576"/>
        <CAPABILITIES forbidden="" disabledtypes="" servertype="arcmapserver" returngeometry="xmlmode"/>
      </ENVIRONMENT>
      <LAYOUTINFO pageunits="inches">
        <ENVELOPE minx="0" miny="0" maxx="8.5" maxy="11" />
      </LAYOUTINFO>
      <PROPERTIES>
        <FEATURECOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <FILTERCOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <MAPUNITS units="decimal_degrees"/>
        <BACKGROUND color="255,255,255"/>
        <ENVELOPE minx="-178.637433658708" miny="-149.932588181915" maxx="180.202305702247" maxy="148.932531819555" name="Initial_Extent" />
      </PROPERTIES>
      <LAYERINFO type="image" name="Background" id="1" visible="true">
      </LAYERINFO>
      <LAYERINFO type="featureclass" name="Countries" id="0" visible="true">
        <FCLASS type="polygon">
          <FIELD name="#ID#" type="-99" size="4" precision="0" />
          <FIELD name="#SHAPE#" type="-98" size="0" precision="0" />
          <FIELD name="AREA" type="8" size="12" precision="11" />
          <FIELD name="NAME" type="12" size="40" precision="0" />
          <FIELD name="ABBREVNAME" type="12" size="12" precision="0" />
          <FIELD name="FIPS_CODE" type="12" size="2" precision="0" />
          <FIELD name="WB_CNTRY" type="12" size="3" precision="0" />
        </FCLASS>
      </LAYERINFO>
    </SERVICEINFO>
  </RESPONSE>
</ARCXML>

Dataframe attribute and DATAFRAMEINFO

ArcMap documents can contain multiple data frames. By default, only information on the active data frame is included in a SERVICEINFO response. To retrieve information on all data frames, the dataframe attribute must be used. When dataframe is used, the structure of the response changes, and DATAFRAMEINFO is included in the response. The following table compares the two structures in general terms.

Request Structure
When dataframe is not included. <?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <RESPONSE>
    <SERVICEINFO>
      <ENVIRONMENT>...</ENVIRONMENT>
      <LAYOUTINFO>...</LAYOUTINFO>
      <PROPERTIES>...</PROPERTIES>
      <LAYERINFO>...</LAYERINFO>
      <LAYERINFO>...</LAYERINFO>
    </SERVICEINFO>
  </RESPONSE>
</ARCXML>
When dataframe is included. <?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <RESPONSE>
    <SERVICEINFO>
      <ENVIRONMENT>...</ENVIRONMENT>
      <LAYOUTINFO>...</LAYOUTINFO>
      <DATAFRAMEINFO>
        <PROPERTIES>...</PROPERTIES>
        <LAYERINFO>...</LAYERINFO>
      </DATAFRAMEINFO>
      <DATAFRAMEINFO>
        <PROPERTIES>...</PROPERTIES>
        <LAYERINFO>...</LAYERINFO>
      </DATAFRAMEINFO>
    </SERVICEINFO>
  </RESPONSE>
</ARCXML>

Since each data frame has its own properties and layer information, when dataframe is included in the request, PROPERTIES and LAYERINFO become child elements of DATAFRAMEINFO in the response.

Dataframe takes data frame names as its value. The following table summarizes different scenarios for assigning values to dataframe:

Usage Result
dataframe="" Treated the same as if dataframe were not present in request.
dataframe="#ALL#" All data frames are included in response.
dataframe="Layers" Only information on the data frame named "Layers" is included in response.
dataframe="Layers;States" Information on the data frames named "Layers" and "States" is included in response. The separator used is a semicolon (;). One restriction in the ArcMap document is that data frame names cannot include a semicolon. If a semicolon is included in the data frame name, the request will likely not process correctly.
dataframe="Layersxxx" If a data frame in the list does not exist, an error message is returned, and the request is not processed.

In the next example, dataframe is set to "#ALL#".

GET_SERVICE_INFO request with renderer
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_SERVICE_INFO envelope="false" fields="false" dataframe="#ALL#" />
  </REQUEST>
</ARCXML>

Since only one data frame is included in the service, only one instance of DATAFRAMEINFO is included in the response.

SERVICEINFO response with DATAFRAMEINFO
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <RESPONSE>
    <SERVICEINFO>
      <ENVIRONMENT>
        <LOCALE language="en" country="US"/>
        <UIFONT name="Arial" color="0,0,0" size="12" style="regular"/>
        <SEPARATORS cs=" " ts=";"/>
        <SCREEN dpi="96"/>
        <IMAGELIMIT pixelcount="1048576"/>
        <CAPABILITIES forbidden="" disabledtypes="" servertype="arcmapserver" returngeometry="xmlmode"/>
      </ENVIRONMENT>
      <LAYOUTINFO pageunits="inches">
        <ENVELOPE minx="0" miny="0" maxx="8.5" maxy="11" />
      </LAYOUTINFO>
      <DATAFRAMEINFO name="Layers">
        <PROPERTIES>
          <FEATURECOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
          <FILTERCOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
          <MAPUNITS units="decimal_degrees"/>
          <BACKGROUND color="255,255,255"/>
          <ENVELOPE minx="-176.453309664892" miny="-120.899619477762" maxx="174.852769885559" maxy="123.217832626079" name="Initial_Extent" />
        </PROPERTIES>
        <LAYERINFO type="image" name="Background" id="1" visible="true">
          <ENVELOPE minx="-180.10415" miny="-89.8896767396583" maxx="179.900453479317" maxy="90.112625" />
        </LAYERINFO>
        <LAYERINFO type="featureclass" name="Countries" id="0" visible="true">
          <FCLASS type="polygon">
            <ENVELOPE minx="-180" miny="-90" maxx="180" maxy="83.5960388183594" />
            <FIELD name="FID" type="-99" size="4" precision="0" />
            <FIELD name="#SHAPE#" type="-98" size="0" precision="0" />
            <FIELD name="AREA" type="8" size="12" precision="11" />
            <FIELD name="NAME" type="12" size="40" precision="0" />
            <FIELD name="ABBREVNAME" type="12" size="12" precision="0" />
            <FIELD name="FIPS_CODE" type="12" size="2" precision="0" />
            <FIELD name="WB_CNTRY" type="12" size="3" precision="0" />
          </FCLASS>
        </LAYERINFO>
      </DATAFRAMEINFO>
    </SERVICEINFO>
  </RESPONSE>
</ARCXML>

Toc and toctype attributes

When toc is set to "true" in GET_SERVICE_INFO, information for swatches used in the table of contents for ArcIMS Java Viewers, ArcExplorer-Java Edition, and ArcMap is included. Toctype specifies the format of the swatches. In the request below, toc is set to true and toctype is set to "bmp".

GET_SERVICE_INFO request with extensions
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <REQUEST>
    <GET_SERVICE_INFO envelope="false" fields="false" toc="true" toctype="bmp"/>
  </REQUEST>
</ARCXML>

The response includes TOC, TOCGROUP, and TOCCLASS. Together, these elements define the swatches and any text used with the swatches. The swatch images embedded in the TOCCLASS are base64 encoded and are not compressed. The response can be rather lengthy if many layers are used and many categories are used within each layer. The following response shows the TOCCLASS information for the two layers in the service. Note that most of the embedded information has been removed.

SERVICEINFO response with extensions
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <RESPONSE>
    <SERVICEINFO>
      <ENVIRONMENT>
        <LOCALE language="en" country="US"/>
        <UIFONT name="Arial" color="0,0,0" size="12" style="regular"/>
        <SEPARATORS cs=" " ts=";"/>
        <SCREEN dpi="96"/>
        <IMAGELIMIT pixelcount="1048576"/>
        <CAPABILITIES forbidden="" disabledtypes="" servertype="arcmapserver" returngeometry="xmlmode"/>
      </ENVIRONMENT>
      <LAYOUTINFO pageunits="inches">
        <ENVELOPE minx="0" miny="0" maxx="8.5" maxy="11" />
      </LAYOUTINFO>
      <PROPERTIES>
        <FEATURECOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <FILTERCOORDSYS string="GEOGCS[&quot;GCS_Assumed_Geographic_1&quot;,DATUM[&quot;D_North_American_1927&quot;,SPHEROID[&quot;Clarke_1866&quot;,6378206.4,294.9786982]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433]]" id="104000"/>
        <MAPUNITS units="decimal_degrees"/>
        <BACKGROUND color="255,255,255"/>
        <ENVELOPE minx="-178.637433658708" miny="-149.932588181915" maxx="180.202305702247" maxy="148.932531819555" name="Initial_Extent" />
      </PROPERTIES>
      <LAYERINFO type="image" name="Background" id="1" visible="true">
        <TOC>
          <TOCGROUP heading="RGB Composite">
            <TOCCLASS label="Red: Band_1" description="Red: Band_1"<Qk0SCQ ...5uAAAA</TOCCLASS>
            <TOCCLASS label="Blue: Band_2" description="Blue: Band_2"<Qk0SCQ ...5uAAAA</TOCCLASS>
            <TOCCLASS label="Green: Band_3" description="Green: Band_3"<Qk0SCQ ...5uAAAA</TOCCLASS>
          </TOCGROUP>
        </TOC>
      </LAYERINFO>
      <LAYERINFO type="featureclass" name="Countries" id="0" visible="true">
        <FCLASS type="polygon"></FCLASS>
        <TOC>
          <TOCGROUP>
            <TOCCLASS label="" description="">Qk0SCQ ...5uAAAA</TOCCLASS>
          </TOCGROUP>
        </TOC>
      </LAYERINFO>
    </SERVICEINFO>
  </RESPONSE>
</ARCXML>

Dpi attribute

The final attribute in GET_SERVICE_INFO is dpi (dots per inch). If a value is assigned to dpi in GET_SERVICE_INFO, this new value is returned in SCREEN in the SERVICEINFO response. Based on the new dpi, the minimum and maximum scales returned for LAYERINFO are recalculated. The recalculation is useful in situations where the ArcMap document was created on a machine with one dpi, but the client uses a different dpi. If dpi is not included in GET_SERVICE_INFO, the dpi is assumed to be "96".

The ArcIMS Java Viewers, ArcExplorer-Java Edition, and ArcMap send the dpi of the client in a GET_SERVICE_INFO request. The ArcIMS HTML Viewer does not send the dpi of the client. It uses a default value of "96". Therefore, when using the ArcIMS HTML Viewer, the dpi of the client may not have the same dpi as the map document. This means that scale dependencies will behave slightly different in the HTML Viewer.

The minimum and maximum scale values in LAYERINFO are listed as number of map units per pixel. In requests and the map configuration file, scales can be set using a relative scale ratio such as 1:24000. In this example, 1 meter equals 24000 meters or 1 inch equals 24000 inches.

Map units per pixel refers to the number of meters, feet, or decimal degrees represented by one pixel in a map. To convert from a relative scale to map units per pixel, the size of a pixel must first be calculated. The formula for finding the number of meters in a pixel is 0.0254 / dpi where: As an example of calculating pixel size, if the dpi is 96, the pixel size is 0.0254 / 96 or 0.000265 m.

Once the pixel size is known, the relative scale can be converted to map units per pixel:
  1. If the scale is in meters. To calculate the number of meters per pixel, take the relative scale and multiply by the pixel size (0.000265). For example, if the relative scale is 1:24000, then the number of meters per pixel is 24000 * 0.000265, or 6.36 meters.
  2. If the scale is in feet. Do the calculation for meters (#1). Multiply the result by 3.28 (the number of feet in a meter). For example, if the number of meters per pixel is 6.36, the number of feet per pixel is 6.36 * 3.28, or 20.86 feet.
  3. If the scale is in decimal degrees. For these calculations, the earth is assumed to be an exact circle with a circumference of 40030.174 km. One degree is 111.195 km (40030.174/360 degrees) or 111195 meters. To calculate the number of degrees, first do the calculation for meters (#1). Next, divide the result by 111195. For example, if the number of meters per pixel is 6.36, the number of degrees per pixel is 6.36 / 111195, or 0.0000571968.
If the maxscale for a LAYER is set to 1:12500000 in the map configuration file, and the dpi in GET_SERVICE_INFO is "96", then the maxscale for LAYERINFO is "3307.29828126323", or approximately 3307 meters per pixel.

<LAYERINFO type="featureclass" name="Countries" id="0" visible="true" maxscale="3307.29828126323">
  <FCLASS type="point"> </FCLASS>>
</LAYERINFO>

If the dpi in GET_SERVICE_INFO is "120", then the maxscale for LAYERINFO is "2645.83862501058", or approximately 2645 meters per pixel.

<LAYERINFO type="featureclass" name="Countries" id="0" visible="true" maxscale="2645.83862501058">
  <FCLASS type="point"> </FCLASS>>
</LAYERINFO>