Landscape change analysis with MOLUSCE - methods and algorithms

Материал из GIS-Lab
Перейти к навигации Перейти к поиску

General structure of the plugin

MOLUSCE consists of several parts:

  • GUI modules (implement user interface)
  • Utility modules
    • Data Provider (provides procedures of reading/writing raster/vector data and similar utility functions)
    • Cross Tabulation (provides functions for creating contingency tables)
  • Algorithmic modules:
    • Area Analysis (provides procedures of change searching, making change maps)
    • Modeling (provides submodules for modeling relation between input-output data)
    • Simulation (provides procedure of land change simulation)
    • Validation (provides statistic functions and procedures for validation of simulation result)

The paper describes internal structure of most important utility and algorithmic modules. The description is valid for structure of plugin version <= 1.x.x

Utility modules

Data Provider

The module provides data structure for internal storing of raster data. It uses numpy masked arrays as data store. But to to prevent low-level manipulations of the data by user, the module gives special methods for data access (it allows to change internal structure in future, if any need occurs). The most important methods are:

  • Creation and storing methods
    • reading data from file, for example
      r = Raster(filename, maskVals = [...])
      The command creates new raster variable r and reads data from filename into internal storage. If the file contains no-data values, that pixels will be stored as masked pixels. An user can specify addition list of no-data values by maskVals variable. The initialization procedure uses gdal utilities and can read all data types that are supported by gdal.
    • creating new raster, for example
      r = Raster()
      r.create([band1Array, band2Array, ...], geodata=...)
      A user can create a raster variable by using masked array.
    • saving data, for example
      r.save(filename)
      A raster can be saved into a file, the method uses dgal utilities.
  • Access to the data and data manipulation
    • getBand method allows to user read partial raster's band from internal storing. For example, if r is variable assigned with 3-bands raster data, user can read a band:
      band1 = r.getBand(1); band1 = r.getBand(1);
    • setBand
    • getBandsCount
    • getGeodata
    • setGeoData
    • getBandGradation
    • getBandStat
    • normalize and denormalize methods.
  • Comparing
    • geoDataMatch
    • geoTransformMatch