Skip to content
DerekVanBerkel edited this page Oct 1, 2015 · 9 revisions

Calibration module development

The calibration of FUTURES is conducted to match observed urban growth patterns to those simulated by the model. Sizes and shapes of new urban development are measured in order to mimic the growth of similar size and shape patches.

Input

Map of change for the reference time period. For calibration purposes, we are only interested in those places that changed to development during the reference period. Using land cover maps from two time steps, identify locations that changed from natural/agricultural land to developed land. All other areas can be classified as 'other' or 'NoData'.

Alternatively, a tool could be built that takes the land cover as binary data (developed vs undeveloped) for two time steps (beginning and end of the reference period) and calculates change internally.

Classification areas into patches

Classify those areas that changed into patches. Previous applications of the model have used a four neighbor rule for patch classification (Meentemeyer et al. 2013, Dorning et al. 2015). Then calculate the size and SHAPE of each of those new development patches. These will serve as the observed patch sizes and shapes that we will calibrate the simulated patch sizes and shapes to match. SHAPE is defined by McGarigal et al. 2002, see pages 100 and 103 of the Fragstats documentation.

Calibration

Calibration procedures must be conducted for both the size and shape parameters.

Patch size

The sizes of patches simulated by FUTURES are determined by a patch size distribution file, patch sizes. This distribution should match the distribution of patch sizes for the reference period (observed change described above). Often the length of the reference time period does not match the time period at which we are trying to simulate. For example, you may observe change over a ten year time period, but wish to simulate at one year time steps. In this case, you need to calibrate the distribution of patch sizes so that simulated results after ten years closely match the observed patterns. The discount factor (Meentemeyer et al. 2013, Eq. 5) can be used to alter the size of simulated patches and must have a value between 0 and 1. This factor is multiplied by the patch sizes listed in the patch size file. Calibration is achieved by varying the value of the discount factor, comparing the distribution of simulated patch sizes to those observed for the reference period, and choosing the value that provides the closest match. (Note. It may be possible for this value be greater than 1 in order to make patches larger than those listed in the patch size file. I don’t see anything in the code that would force it to be between 0 and 1).

Patch shape

The shapes of patches simulated by FUTURES are governed by the patch compactness parameter (Meentemeyer et al. 2013, Eq. 1). The user tells FUTURES the mean and range of this parameter, allowing for variation in patch shape. This parameter must have a value between 0 and 1, as the value of the parameter increases, patches become more compact. Calibration is achieved by varying the values of the patch compactness parameter mean and range, comparing the distribution of simulated patch shapes to those observed for the reference period, and choosing the values that provide the closest match.

Tools in GRASS for patch analysis

I think the last one is very simple but effective, not sure which one scales better.

  • r.li.* modules - probably not useful, they don't provide information about individual patches, they aggregate the patch attributes based on sampling window and compute different diversity indices
  • r.le.patch - GRASS GIS 7 addon, old one but will work, gives text file with the attributes of individual patches (size, perimeter, compactness - equation is similar)
  • simplest workflow:
    1. r.to.vect to convert raster patches into vector areas
    2. v.to.db compute size, perimeter, compactness (eq as in the article)

Questions

  • What exactly is the input for the tool finding the patches? Difference of 2 land cover maps (with development class only)? YES, we are only interested in places that changed to development over the reference period

  • How is patch defined? Continuous area, what about 4- or 8-neighborhood? 4-neighbor rule

  • Simulating patches means to run PGA (r.futures)? Yes

  • How exactly discount factor works? See equation 5 of Meentemeyer et al 2013 - that is all I know...

  • Should the calibration tool automatically guess the best parameters, or it should just streamline the patch analysis and simulation and user himself would assess the result and run it with different parameters? If it should guess automatically, what would be the criteria for best match? Do the shape and size calibration depend on each other? This one is complicated. For the first part: I was comparing the distributions visually when I was doing some early calibration tests (pre-FUTURES publication). Basically, you just want the size and shape distributions to match, so you run the model for different values and pick the value that gives you the distribution that looks best. The calibration tool that Jing developed appears to have some automatically generated criteria, but I haven't dug around in the code to figure it out. Ideally this would be automated but I don't know how complicated that will be, whereas generating the histograms would likely be rather simple. Part two: I assume so. In my early analyses, I just looked at sizes, holding shape constant, then calibrated shape. Obviously this may not be ideal if these two are dependent on one another. It looks like Jing's scripts were designed to calibrate both at the same time, perhaps trying different combinations...I did check the scripts and also only see MSE as the comparison metric.

  • What is patch_factor in r.futures? See equation 1 of Meentemeyer et al 2013

McGarigal, K., S. A. Cushman, M. C. Neel, and E. Ene. 2002. FRAGSTATS: Spatial pattern analysis program for categorical maps. Amherst: University of Massachusetts.

Calibration module pseudocode

First version would just give the match for a given combination of patch compactness and size values.

Inputs specific to calibration

  • development_start, development_end ... binary map with developed land at 2 times
  • n_run ... number of times PGA will run for each combination of parameters
  • mean of patch compactness
  • range of patch compactness
  • discount factor

Steps

  1. Compute 'difference' between 2 developments:

    r.mapcalc "patches_original = if (development_end && !development_start, 1, null())"

  2. Analyze patches:

    1. Create vector patches using r.to.vect.
    2. Compute area size and compactness using v.to.db
    3. Create histogram of the patches using numpy.histogram.
  3. For each PGA run:

    1. Run PGA with the given values of the calibrated parameters.
    2. Analyze patches (step 2) and create histogram.
    3. Compute distance of the simulated histogram and the original one and store the distance.
  4. Average the distance.

  5. Output result.

Notes: