English

How To: Add an ARC/INFO Grid to a map configuration file

Summary

Instructions provided demonstrates how to add an ArcInfo Grid to a map confiugartion file. ArcInfo Grids must be added to map configuration files manually, using a text editor.

Procedure

  1. Create a folder at the C:\ root level called ims_grid.
  2. Download the sample data. Extract the contents of the WinZip file to C:\ims_grid.

    Warning:
    This example will not work if the example data are not located in C:\ims_grid.

  3. Open a text editor such as WordPad or Notepad and open grid.axl from C:\ims_grid.

    Note:
    It may be necessary to change 'Files of Type' to 'All Files' in order to see grid.axl.

  4. Add a new IMAGEWORKSPACE element to the map file making sure to include the following required attributes: directory and name. For example:

    Code:
    <WORKSPACES>
    <SHAPEWORKSPACE name="shp_ws-0" directory="C:\ims_grid" />
    <IMAGEWORKSPACE name="img_ws-0" directory="C:\ims_grid" />
    </WORKSPACES>

  5. Add a new LAYER element to the map file making sure to include the following required attributes: name, type, visible and id. For example:

    Code:
    <IMAGEWORKSPACE name="img_ws-0" directory="C:\ims_grid" />
    </WORKSPACES>
    <LAYER type="image" name="Land Use" visible="true" id="landuse" >


    Note:
    Refer to the ArcIMS ArcXML Programmer's reference for optional LAYER attributes.

  6. Add a new DATASET element to the map file making sure to include the following required attributes: name, type and workspace. For example:

    Code:
    <IMAGEWORKSPACE name="img_ws-0" directory="C:\ims_grid" />
    </WORKSPACES>
    <LAYER type="image" name="Land Use" visible="true" id="landuse" >
    <DATASET name="landuse" type="image" workspace="img_ws-0" />

  7. Add the closing LAYER element to the map configuration file. For example:

    Code:
    <IMAGEWORKSPACE name="img_ws-0" directory="C:\ims_grid" />
    </WORKSPACES>
    <LAYER type="image" name="Land Use" visible="true" id="landuse" >
    <DATASET name="landuse" type="image" workspace="img_ws-0" />
    </LAYER>


  8. Save grid.axl and close the text editor.

    Note:
    Click yes if the prompt appears with the following message: 'You are about to save the document in a Text-Only format, which will remove all formatting. Are you sure you want to do this?'

  9. Using ArcIMS Administrator, create a new map service called grid. For Map File, browse to C:\ims_grid and choose grid.axl. For Virtual Server, choose ImageServer1 and click OK.

    If the service fails to add, recheck the previous steps.