calc_cf2pts: Central feature between 2 point patterns (CF2PTS) Calculator

calc_cf2ptsR Documentation

Central feature between 2 point patterns (CF2PTS) Calculator

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

calc_cf2pts(id=1, points1=NULL, points2=NULL, verbose=FALSE)

Arguments

id

A unique integer to identify the CF2PTS

points1

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

points2

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

verbose

A Boolean flag to control verbose reporting on monitor

Details

Use the LOCATIONS element in the output list object along with the ATTRIBUTES elements can be used to produce shapefiles or other vector point files for geographic data.

Value

The returned result is a list:

TYPE

The type of calculation results stored in the object: BOX, SDD, SDE, CMD, CF, or CF2PTS, MNC, MDC

DATE

The date and time that the function was run

ID

Identifier for the central feature - it should be unique

LOCATIONS

Locations pertinent for the CF2PTS that can be used with ATTRIBUTES if wishing to build a vector point file for geographic data outside of this pacakge.

FORPLOTTING

Coordinates and identifiers used for plotting.

ATTRIBUTES

Attributes for the output CF2PTS that can be used with LOCATIONS coordinates if wishing to build a vector point file for geographic data outside of this package.

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 specific for plotting are stored in the FORPLOTTING element within the produced list object. This function can be used on its own (once) or repetitively in a loop to process grouped point data stored in a larger table. When used repetitively, be sure to increment the id argument to ensure that each CF2PTS has a unique identifier.

Author(s)

Randy Bui, Ron Buliung

See Also

calc_box, calc_sdd, calc_sde, calc_cmd, calc_cf, calc_mnc, calc_mdc

Examples

# CF2PTS EXAMPLE
data(activities)
data(activities2)
a <- calc_cf2pts(id=1, points1=activities, points2=activities2)
str(a)
print(a)

# IF THE RESULT OF THIS FUNCTION IS STORED TO AN OBJECT, THE plot_box()
# FUNCTION WILL TAKE THAT OBJECT AS INPUT FOR PLOTTING VIA THE datin ARGUMENT

# CF2PTS TO SHAPEFILE EXAMPLE (REMOVE THE COMMENTS TO RUN)
# shp <- convert.to.shapefile(a$LOCATIONS, a$ATTRIBUTES, "id", 5)
# write.shapefile(shp, "CF2PTS_Shape", arcgis=T)

aspace documentation built on Sept. 8, 2023, 5:48 p.m.

Related to calc_cf2pts in aspace...