chg_traj: Calculate change-trajectory image

Description Usage Arguments Details Value References Examples

View source: R/chg_traj.R

Description

This function will calculate trajectories of land cover change using the Change Vector Analysis in Posterior Probability Space (CVAPS) approach of comparing posterior probabilities of class membership with an automatically determined threshold. Areas of no change are coded as -1. A lookup table for the codes output by chg_traj can be calculated with traj_lut.

Usage

1
chg_traj(chg_mag, chg_dir, chg_threshold, filename, overwrite = FALSE, ...)

Arguments

chg_mag

change magnitude RasterLayer from CVAPS

chg_dir

change direction RasterLayer from CVAPS

chg_threshold

the threshold to use as a minimum when determining change areas (can use DFPS to determine this value).

filename

filename to save the output RasterLayer to disk (optional)

overwrite

whether to overwrite existing files (otherwise an error will be raised)

...

additional parameters to pass to rasterEngine

Details

This function will run in parallel if a parallel backend is registered with foreach.

Value

a RasterLayer of change trajectories, with change trajectories coded as in the lut output by traj_lut

References

Chen, J., P. Gong, C. He, R. Pu, and P. Shi. 2003. Land-use/land-cover change detection using improved change-vector analysis. Photogrammetric Engineering and Remote Sensing 69:369-380.

Chen, J., X. Chen, X. Cui, and J. Chen. 2011. Change vector analysis in posterior probability space: a new method for land cover change detection. IEEE Geoscience and Remote Sensing Letters 8:317-321.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
t0_train_data <- get_pixels(L5TSR_1986, L5TSR_1986_2001_training, "class_1986",training=.6)
t0_model <- train_classifier(t0_train_data)
t0_preds <- classify(L5TSR_1986, t0_model)
t1_train_data <- get_pixels(L5TSR_2001, L5TSR_1986_2001_training, "class_2001", training=.6)
t1_model <- train_classifier(t1_train_data)
t1_preds <- classify(L5TSR_2001, t1_model)
t0_t1_chgmag <- chg_mag(t0_preds$probs, t1_preds$probs)
t0_t1_chgdir <- chg_dir(t0_preds$probs, t1_preds$probs)

lut <- traj_lut(t0_preds$codes$code, t0_preds$codes$class)
t0_t1_chgtraj <- chg_traj(lut, t0_t1_chgmag, t0_t1_chgdir, .5)

# Change areas are coded following the above lookup-table (lut):
plot(t0_t1_chgtraj)

# No change areas are -1:
plot(t0_t1_chgtraj == -1)

## End(Not run)

azvoleff/teamlucc documentation built on June 4, 2017, 12:08 a.m.