GoTo the ALES Home Page


"ILWES"
Transferring ALES evaluation results to ILWIS


ILWIS for Windows is a powerful Remote Sensing/GIS program that is used in many land evaluation activities.

The Automated Land Evaluation System (ALES) is a MS-DOS computer program that allows land evaluators to build their own expert systems to evaluate land according to the method presented in the FAO's "Framework for Land Evaluation".

ALES is not a GIS and can not display maps nor perform spatial analysis. It is used to evaluate Land Evaluation Units, abbreviation LEU, which can be individual delineations (polygons) but which usually correspond to a legend category (e.g. soil map units, agro-ecological zones), which are composed of many delineations (polygons) on the map.

Thus, in general, ALES evaluation results must be exported to a GIS for display and further spatial analysis. The ALES User's Manual contains detailed instructions for interfacing ALES with IDRISI (Clark University, Worcester, MA, USA) and with PC-ArcInfo and ArcView, via xBase-format files.

Note: xBase is the generic term for dBase III+ format; we use the generic term to avoid confusing a file format with a specific program.

ALES can also export evaluation results to ILWIS. This is not explained in the User's Manual, so we do it here. There are probably better ways to do this; however, the procedure presented here has been tested by the author.

You need the following software:

  1. ILWIS 2.1, Patch Level 2 or later. Note that these notes have not been tested with ILWIS 3; I assume it works very much like ILWIS 2.2, but you will have to be alert if you try this.
  2. ALES V3 or later; instructions here are specific to ALES V4.65 but should work with minor modifications with earlier versions.
You do not need dBase or any other database program that can work with xBase files (e.g. Paradox, MS Excel), unless you are curious how the dBase file looks.

Step 1: Prepare a base map of the LEU's in ILWIS

In this step, we set up a base map to show the Land Evaluation Units; these same units will be evaluated in ALES and then the results will be passed to ILWIS for display and analysis. We'll call this map base in these instructions.
  1. Prepare a vector or raster polygon base map (base), with a class domain which contains the LEU codes. We'll call this domain LEU in these instructions. This is a base map; when you display it, you see the LEU which are to be evaluated.

    Extremely important: the LEU codes you use in your base map must match exactly the LEU codes you use in your ALES database.


Step 2: Create an xBase table to receive the results

In this step, you create a table that can be linked to the base map. Then you export the table to xBase format, so that ALES can write evaluation results to it. We'll call this table results in these instructions.

This step is done in ILWIS.

  1. Use the ILWIS Create | Table command to create a table. [ILWIS command: Create tbl]. In the Create Table dialog box:
    1. Table name: your choice, e.g. results
    2. Description: your choice
    3. Domain: from the drop-down list, select LEU, i.e. the same class domain that is used in the base map We'll call this the results table.
  2. Add columns to the table to receive the evaluation results. With the table open, for each result column:
    1. Command Column | Add Column; the Add Column dialog opens.
    2. In the Add Column dialog box:
      1. Column Name: your choice; suggestion: LUT + result type. For example, LUT1_PSC.
        Warning! This name must be 8 characters or less, otherwise there will be problems in Step 5.5, below.
      2. Domain: String
  3. Important! Because of a bug in ILWIS 2.1 and 2.2, you must fill in the data fields for at least one record, making sure that you use strings that are at least as long as the longest result you expect from ALES. You can use real results, or just a long string of x's.
  4. Close the table.
  5. Export the table to xBase format:
    1. Command: Export; the Export dialog box opens.
    2. In the Export dialog box:
      1. Source file: the table you just created, e.g. results
      2. Export Format: dBase III/IV table .DBF
      3. Output file name: your choice; you can accept the default (same name as the ILWIS table, but extension .dbf); we'll call this results.dbf in these instructions.

Step 3: Set up transfer templates in ALES

In this step, you tell ALES about the xBase file you just created, and which ALES results should go to which fields.
  1. Start ALES
  2. Choose your evaluation model
  3. In Menu 1 'Main Options' choose Menu Option 1.8 'ALES <--> xBase'
  4. In Menu 1.8 'ALES <--> xBase', choose Menu Option 1 'Edit import/export templates'
  5. Press F3 to add a new template
  6. Give it a name, e.g. to_ilwis
  7. When asked 'What kind of ALES <--> xBase transfer?', answer '4' (Export evaluation results to xBase).
  8. In the 'ALES <--> xBase transfer template' form:
    1. Description: your choice
    2. xBase file name: enter the full path and file name of the xBase file you created in Step 2, e.g. results.dbf. ALES will complain if it can't find the file.
    3. xBase key field: press F3 to get a pop-up list; select the key field that you defined in the ILWIS table (for example, LEU). This is the field that contains the LEU codes.
    4. Press F10 to complete the form
  9. In Menu 1.8.1 'ALES <--> xBase I/O Template', select Menu Option 2 'List of transfer items'; you will see an empty list box.
  10. For each result that is to be transferred:
    1. Press F3 to add a New transfer field
    2. Select an xBase field, e.g. LUT1_PSC. The pop-up list also shows the field type (C) and width, which depends on the width of the 'dummy' item you entered in Step 2.3. The field must be wide enough to hold the longest results string from ALES.
    3. Select the appropriate evaluation result to go into this field, e.g. LUT1, Physical Suitability Subclass
The following step is also done in ALES.

Step 4: Evaluate LEU's in ALES and export the results

In this step, we do the land evaluation for the Land Evaluation Units, and export these to an xBase file, ready to be read by ILWIS.
  1. Build your ALES model. Allow several weeks for this step :-).
  2. Prepare your ALES LEU data base using the same LEU codes that make up the domain of the ILWIS base map.

    Extremely important: the LEU codes you use in your ALES database must match exactly the LEU codes you use in your base map.

    Note: the best way to ensure this is to import the LEU codes from ILWIS to ALES, also via xBase files. I will leave this to your initiative for now...

  3. Compute an evaluation for these map units and for the LUTs you want to export. Review the evaluation results matrix. Now you can transfer the results to the xBase file.
  4. In Menu 1.8 'ALES <--> xBase', choose Menu Option 5 'Export evaluation results from ALES to xBase'
  5. When asked 'Transfer according to which ALES <--> xBase I/O Template?', select the template you created in Step 3, e.g. to_ilwis.
  6. Confirm; ALES will export to the xBase file, and you will see an on-screen report of the number of records matched. If you have a correct correspondence between the LEU lists in ALES and ILWIS, all records should have been matched.

Step 5: Import the xBase table to ILWIS

In this step, we bring the results into ILWIS, and set up the table so it can be linked to the base map via a common domain.

This step is done in ILWIS.

  1. Select ILWIS command: Import; the Import dialog box opens.
  2. In the Import dialog box:
    1. Import Format: dBase Table .DBF
    2. Input file: Select the xBase file that you just saved and modified with ALES, e.g. results.dbf.
    3. Output FileName: the default is the same as the dBase table; to be safe, you should use another name, otherwise your original ILWIS table will be overwritten. For this example, call the output table results2.
  3. The domain type dialog box opens; in this dialog, specify Class as the domain types of all columns; ILWIS will automatically convert the values to a domain. In addition, for the key field, i.e. the column containing the LEU names, check the table domain box.
  4. ILWIS saves the new table; this ends the Import command.
  5. Open the ILWIS table, e.g. results2; you should see the same column (field) names that you created in Step 2; also the table domain has the LEU codes.

    However, the actual domain of the table is not LEU; instead it was created by ILWIS automatically and has a name like LEU00001; we must change this domain in order to link the imported data with maps that use the LEU domain. Unfortunately, ILWIS 2.1 and 2.2 do not allow the user to specify an existing domain on import (I have made this request to the programmers).

  6. To change the domain of the key column, it depends on your version, being much simplier in V2.2 than V2.1
    Step 5.6 for ILWIS 2.1

    Basic concept: We must first export to ILWIS 1.4 format, then re-import with the domain we want! Then we have to fix up the column domains again, because they are not preserved in the export/import process (Did I ever say this was going to be simple?)

    1. Select command Export.
    2. In the Export dialog box:
      1. Select the table you just imported from xBase, e.g. results2.
      2. Export Format is ILWIS Version 1.4 (the default)
      3. Output file name: accept the default, e.g. results2.
    3. Select command Import
    4. In the Import dialog box:
      1. Import Format: ILWSI Version 1.4 table .TBL
      2. Input file: Select the ILWIS 1.4 table you that you just exported, e.g. results2.
      3. Output FileName: accept the default, i.e. to over-write the original ILWIS 2.1 table you just exported, e.g. results2.
      4. Click OK
    5. The 'Import Table from version 1.4' dialog box opens:
      1. Domain Name: select the domain with the LEU's, e.g. LEU
      2. Accept the other defaults, including the output table name; press OK
      Note: If there are any LEU's exported from ALES that do not appear in the base map (actually, in the LEU domain), their codes will be replaced with Unknown (?). This shouldn't happen if the list of LEU's is the same in ALES as in the base map; however, if the base map LEU's are a subset of the ALES model's LEU, this would happen, and would not be an error.

      The table, e.g. results2, now has the same table domain as the base map. Unfortunately, the domains of all the other columns have been re-set to string! So, these must be reset to the correct class domains, otherwise they can not be used in map display or calculations.

    6. Open the table you just imported from ILWIS 1.4, e.g. results2
    7. Select command Columns | Column Management; the Column Management dialog box opens.
    8. For each column of results:
      1. Select the column in the list
      2. Click the Properties button
      3. In the Column Properties dialog box, select the correct domain from the Domain drop-down list. This is the same domain that you originally created for the column in Step 2.
    9. Close the Column Management dialog; close the table.
    10. Skip to Step 6

    Step 5.6 for ILWIS 2.2

    Basic concept: Change the table domain using a table operation.

    1. Select the table (e.g. results) in the Catalog, right-click, and from the pop-up list select Table Operations | 'Change Domain..'. A dialog box 'Change Domain of Table' appears, with the source table name already entered.
    2. Click the Domain radio button to indicate that you want to change the domain of the table itself, not one of the columns. A selection list of domains appears to the right of the radio button.
    3. In the selection list, select the original domain, e.g. LEU. In the Output Table box, enter a new name, e.g. results2. Press the OK button, and the new table is created, with the LEU domain.
      Note: If there are any LEU's exported from ALES that do not appear in the base map (actually, in the LEU domain), their codes will be replaced with Unknown (?). This shouldn't happen if the list of LEU's is the same in ALES as in the base map; however, if the base map LEU's are a subset of the ALES model's LEU, this would happen, and would not be an error.
    4. Continue with Step 6

Step 6: Reclassify the base map with ALES results

Now we can link the attribute table that was just created with the base map; then you can continue with any relevant ILWIS analysis.
  1. In the ILWIS catalog, right-click on the base map (e.g. base); from the pop-up menu select Properties.
  2. Check the Attributes Table check box; in the drop-down list, select the table with the results, e.g. results2
  3. Now you can display the map with any of the attributes in the results table: In the ILWIS catalog, double-click the base map; in the Display Options dialog, check the Attribute check box and select the column with the results you wish to display.
  4. You can also use command AttribPoly to make a new polygon map with specific evaluation results.

Step 7: Relax


GoTo the ALES Home Page

Author: D G Rossiter
; Last update: 2007_180