Skip to contents

What is the class or spatial attributes of this feature?

Usage

is_sf(x, ext = FALSE, null.ok = FALSE)

is_sfg(x, null.ok = FALSE)

is_sfc(x, null.ok = FALSE)

is_bbox(x, null.ok = FALSE)

is_sf_list(x, named = FALSE, ext = FALSE, null.ok = FALSE)

is_raster(x, null.ok = FALSE)

is_sp(x, null.ok = FALSE)

is_same_crs(x, y)

is_sf_or_what(x = NULL, return = NULL, us = FALSE, null.ok = TRUE)

Arguments

x

An sf, sfc, or bbox object.

ext

If TRUE, check if x is a sf, sfc, or bbox class object or not; defaults to FALSE. (used by is_sf)

null.ok

If TRUE and x is NULL, return TRUE; defaults to FALSE.

named

If TRUE, check if sf list is named; defaults FALSE.

y

An sf object or a character or numeric object supported by sf::st_crs that can be compared to x. (used by is_same_crs)

return

type of object to return; "list" or NULL (default).

us

If TRUE, check if x is a U.S. state or county name; defaults to FALSE.

Details

  • is_sf: is x a sf class object?

  • is_sfc: is x is a sfc class object?

  • is_bbox: is x is a bbox class object?

  • is_sf_list: is x is a list of sf class objects (with or without names)?

  • is_raster: is x a Raster class object?

  • is_sp: is x a Spatial class object of any type?

  • is_same_crs: do x and y have the same coordinate reference system?