Central feature between 2 point patterns (CF2PTS) Calculator

Share:

Description

Central feature of point2 within point1. Identifies the central feature as the point location in the first pattern that has the smallest cummulative distance to features in a second point pattern.

Usage

1
CF2PTS(id=1, filename="CF2PTS_Output.txt", points1=activities, points2=activities2)

Arguments

id

A unique integer to identify the CF2PTS

filename

A string indicating the ASCII textfile where the central feature coordinates will be written

points1

A 2-column matrix or data frame containing the set of point observations

points2

A 2-column matrix or data frame containing the set of point observations

Details

Use the cf2ptsloc (coordinates) and cf2ptsatt (attributes) to produce shapefiles using the convert.to.shapefile and write.shapefile from the shapefiles library

Value

The result is a list of terms:

id

Identifier for the central feature - it should be unique

CF2PTS.x

X-coordinate of the central feature

CF2PTS.y

Y-coordinate of the central feature

Note

Results are stored in the r.CF2PTS object and can be passed through plotting functions. This function can also be used repetitively within a loop to compute multiple CF2PTS centres from different datasets.

Author(s)

Randy Bui, Ron Buliung

See Also

CF, CMD, median_centre

Examples

1
2
3
4
5
6
## CF2PTS example
CF2PTS(id=1, filename="CF2PTS_Output.txt", points1=activities, points2=activities2)

## CF2PTS to shapefile example (exclude the comments below to run script)
## shp <- convert.to.shapefile(cf2ptsloc,cf2ptsatt,"id",5)
## write.shapefile(shp, "CF2PTS_Shape", arcgis=T)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.