Providing geoscience data globally Navigation
Main content
Bottom links

OneGeology

Home > How to serve a OneGeology WMS > Creating MapServer CLASS definitions from ArcView legends
Information:

This is the OneGeology archive website, for the latest information return to the main OneGeology website

Appendix B: Creating MapServer CLASS definitions from ArcView legends

The Gix Export Tool can help you create the CLASS sections of your map file from an ESRI ArcView 3.x .apr file. This tool converts ESRI ArcView 3.x (NOT ArcMap) projects to common open source alternatives including a MapServer map file. (Please note that this tool has only been used to convert simple symbology e.g. geology polygons symbolized by a solid colour according to its lithology value. Its ability to convert more complex symbology has not been tested.) Download the Gix Export Tool (http://gix.sourceforge.net/). Run the executable and follow the instructions to install the tool as an ArcView 3.x extension. Having installed the Gix Export Tool, create or open an ArcView project containing your symbolized data.

ArcView map view showing symbolized data

Loading the Gix ArcView extension

Load the Gix Export Tool Extension (File — Extensions, tick required extension, click OK).

Loading the Gix ArcView extension

Complete the following steps to convert your project to a MapServer map file.

  1. Select View — Export View.

    ArcView, Exporting your View

  2. The first screen asks you to select your output file format — choose MapServer map file (.map) and click next.

    Gix export tool, selecting output format

  3. The next screen asks you to select a version (choose default) and output file. The output file generated will be a temporary file from which you will cut the CLASS components and paste them into the master map file you have been creating elsewhere. Select a location for your output file and click next.

    Gix export tool, selecting output file

  4. The next screen asks for details of the main and reference map. You won’t use these sections so accept the defaults and click next.

    Gix export tool, details for the main, and reference maps

  5. The next screen asks for details of the legend. Again, you won’t use these sections so accept the defaults and click next.

    Gix export tool, details for the legend

  6. The next screen asks for details of the scale bar. Again, you won’t use these sections so accept the defaults and click next.

    Gix export tool, details for the scale bar

  7. The next screen asks for details of the OGC metadata. Again, you won’t use these sections so accept the defaults and click next.

    Gix export tool, OGC metadata details

  8. The next screen asks for details of final options. Again, you won’t use these sections so accept the defaults.

    Gix export tool, character set encoding and symbology options

  9. Click Finish to create your map file.

Open up the map file you created in a text editor and complete the following steps for each layer in your map file:

  1. Navigate to the line beginning CLASSITEM
  2. Highlight from here down to the END #CLASS line associated with that layer
  3. Copy and paste the selected lines to an empty text file
  4. Delete all TEMPLATE ’ template.html’ lines (one for each class)
  5. Paste the remaining content into your master map file within the section for the layer you are dealing with. A good position is after the END line which closes the METADATA for that layer.

If your symbolization in ArcView had polygon boundaries you will need to remove these from the MapServer symbolization. This may be easier to do by deleting all the ‘OUTLINECOLOR’ lines from the generated map file than by altering your ArcView symbolization.

Section last modified: 19 January 2010

Back|Next