Settings

Example:

<?xml version="1.0"?>

<files xmlns="http://www.w3schools.com"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3schools.com settings.xsd" >

  <raster path = "land-use.asc"
          group = "land-use" />

  <raster path = "map1.asc" />
  <raster path = "region.asc" />
  <raster path = "map2.asc"
          transform = "log" />
  <raster path = "map3.asc"
          transform = "unit-rescaling" />

  <raster path = "zoning.asc"
          group = "mask" />

</files>

XML Structure:

It is expected that settings xml file includes one and only one raster element from ‘land-use’ group, one and only one raster element from ‘region’ group.

<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.w3schools.com"
           xmlns="http://www.w3schools.com"
           elementFormDefault="qualified">

    <!-- definition of elements -->
    <xs:element name="raster"
                type="raster_type" />
    <xs:element name="files">
        <xs:complexType>
            <xs:annotation> <xs:documentation>
                .asc files metadata
            </xs:documentation> </xs:annotation>
            <xs:sequence>
                <xs:element ref="raster" maxOccurs="unbounded" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <!--definition of types-->
    <xs:complexType name="raster_type">
        <xs:attribute name="path"
                         type="xs:string"
                         use="required">
               <xs:annotation> <xs:documentation>
                   Defines path to the .asc file.
               </xs:documentation> </xs:annotation>
           </xs:attribute>

        <xs:attribute name="group">
            <xs:annotation> <xs:documentation>
                Indicates whether .asc file is a
                    1) land use map,
                    2) map with masked values,
                    3) region map.
                Masked cell values (cell=1) are excluded from the analysis and set to NA
                in the resultant GIS-based maps.
            </xs:documentation>  </xs:annotation>

            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="land-use" />   <!-- Land use map -->
                    <xs:enumeration value="mask" />       <!-- Mask map -->
                    <xs:enumeration value="region" />     <!-- Region map -->
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>

        <xs:attribute name="transform">
            <xs:annotation> <xs:documentation>
                Indicates whether cell values should be transformed.
                Supported transformations:
                    log - x'=ln(x)
                    unit-rescaling - x'=(x-x_min)/(x_max-x_min)
            </xs:documentation> </xs:annotation>

            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <!-- logarithmic transformation -->
                    <xs:enumeration value="log" />
                    <!-- rescaling to [0,1] range -->
                    <xs:enumeration value="unit-rescaling" />
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>

</xs:schema>