st_match: Geometry matching

View source: R/utils.R

st_matchR Documentation

Geometry matching

Description

Geometry matching

Usage

st_match(x)

Arguments

x

An object of class sf or sfc.

Value

A numeric vector giving for each feature in x the position of the first feature in x that has an equal geometry.

See Also

match

Examples

library(sf, quietly = TRUE)

p1 = st_sfc(st_point(c(1, 1)))
p2 = st_sfc(st_point(c(0, 0)))
p3 = st_sfc(st_point(c(1, 0)))

st_match(c(p1, p2, p2, p3, p1))


luukvdmeer/sfnetworks documentation built on Nov. 21, 2024, 4:54 a.m.