expect_geometry: Expect geometry type

Description Usage Arguments Details Examples

Description

Expect geometry type

Usage

1
2
3
4
5
6
7
expect_geom_type(
  object,
  type = c("POINT", "LINESTRING", "POLYGON", "MULTIPOINT", "MULTILINESTRING",
    "MULTIPOLYGON", "GEOMETRYCOLLECTION")
)

expect_dimension(object, value)

Arguments

object

object of class sf or sfc

type

test equality geometry type (character)

value

expected value

Details

Examples

1
2
3
4
5
library(sf)
x <- st_point(c(0, 0))
expect_geom_type(x, "POINT")

expect_dimension(x, 0) # For point

uribo/tst documentation built on April 6, 2020, 11:58 p.m.