Learn R Programming

SpatialVx (version 1.0-3)

MergeForce: Force Merges in Matched Feature Objects

Description

Force merges in matched feature objects so that, among other things, subsequent analyses are quicker and cleaner.

Usage

MergeForce(x, verbose = FALSE)

Value

A list object of class “matched” is returned containing several components and the same attributes as x.

match.message

A character string stating how features were matched with (merged) apended.

match.type

character of length 2 naming the original matching function used and this function to note that the features have been forced to be merged/clustered together.

matches

two-column matrix with forecast object numbers in the first column and corresponding matched observed features in the second column. If no matches, this will have value integer(0) for each column giving a matrix with dimension 0 by 2.

unmatched

list with components X and Xhat giving the unmatched object numbers, if any, from the observed and forecast fields, resp. If none, the value will be integer(0).

Note that all of the same list components of x are passed back, except for special information (which is usually no longer relevant) such as Q (deltamm), criteria, criteria.values, centroid.distances (centmatch)

Additionally, merges and/or implicit.merges (centmatch) are not included as they have been merged.

Arguments

x

list object of class “matched”.

verbose

logical, should progress information be printed to the screen.

Author

Eric Gilleland

Details

Objects returned by functions such as deltamm and centmatch provide information necessary to merge and match features from “features” objects. In the case of centmatch, only implicit merges are given, and this function creates objects where the implicit merges are forced to be merged. In the case of deltamm, a second pass through might yield better merges/matches in that without a second pass, only features in one field or the other can be merged and matched (not both simultaneously). Using this function, and apssing the result back through deltamm can result in subsequent matches of merged features from both fields simultaneously. Moreover, in some cases, it may be more computationally efficient to run this function once for subsequent analyses/plotting.

See Also

For identifying features in a field: FeatureFinder

For merging and/or matching features: deltamm, centmatch, plot.matched

Examples

Run this code
x <- y <- matrix(0, 100, 100)
x[2:3,c(3:6, 8:10)] <- 1
y[c(4:7, 9:10),c(7:9, 11:12)] <- 1

x[30:50,45:65] <- 1
y[c(22:24, 99:100),c(50:52, 99:100)] <- 1

hold <- make.SpatialVx( x, y, field.type="contrived", units="none",
    data.name = "Example", obs.name = "x", model.name = "y" )

look <- FeatureFinder(hold, smoothpar=0.5)

look2 <- centmatch( look )

look2

look2 <- MergeForce( look2 )

look2

# plot( look2 )


Run the code above in your browser using DataLab