sf (version 0.3-4)

Ops.sfg: S3 Ops Group Generic Functions (multiply and add/subtract) for affine transformation

Description

Ops functions for simple feature geometry objects (constrained to multiplication and addition)

Usage

# S3 method for sfg
Ops(e1, e2)

Arguments

e1
object of class sfg
e2
numeric; in case of multiplication an n x n matrix, in case of addition or subtraction a vector of length n, with n the number of dimensions of the geometry

Value

object of class sfg

Examples

Run this code
st_point(c(1,2,3)) + 4
st_point(c(1,2,3)) * 3 + 4
m = matrix(0, 2, 2)
diag(m) = c(1, 3)
# affine:
st_point(c(1,2)) * m + c(2,5)

Run the code above in your browser using DataLab