English

How To: Add JPEG2000 files to a map configuration file on Windows

Summary

Instructions provided describe how to add JPEG2000 files to a map configuration file. JPEG2000 files must be added to map configuration files manually using a text editor.

Procedure

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

    Warning:
    This example does not work if the sample data are not located in the C:\jpeg2000 folder.


  3. Using a text editor, such as WordPad or Notepad, open the jpeg2000.axl file from the C:\jpeg2000 folder.

    Note:
    In the File > Open dialog, it may be necessary to change Files of Type to All Files to see jpeg2000.axl.

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

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

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

    Code:
    <IMAGEWORKSPACE name="img_ws-0" directory="C:\jpeg2000" />
    </WORKSPACES>
    <LAYER type="image" name="Sample JPEG200" visible="true" id="jpeg2000" >


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

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

    Code:
    <IMAGEWORKSPACE name="img_ws-0" directory="C:\jpeg2000" />
    </WORKSPACES>
    <LAYER type="image" name="Sample JPEG200" visible="true" id="jpeg2000" >
    <DATASET name="desert.jp2" workspace="img_ws-0" />


    Warning:
    The .jp2 file extension must be added to the end of the jpeg2000 file name specified in the name attribute for the DATASET element. If this extension is not included, ArcIMS Administrator displays a warning yielding the following message: "ImageServer: Layer with ID jpeg2000 cannot be created. Dataset jpeg2000 is missing, unknown type, or invalid."

    The map service is built but the jpeg2000 image is not available when viewed as an ArcIMS image service.

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

    Code:
    <IMAGEWORKSPACE name="img_ws-0" directory="C:\jpeg2000" />
    </WORKSPACES>
    <LAYER type="image" name="Sample JPEG200" visible="true" id="jpeg2000" >
    <DATASET name="desert.jp2" workspace="img_ws-0" />
    </LAYER>


  8. Save jpeg2000.axl and close the text editor. Click Yes if the following message message is displayed: "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 jpeg2000. For Map File, browse to C:\jpeg2000 and select jpeg2000.axl. For Virtual Server, select ImageServer1 and click OK.

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

Related Information