is_geom_type: What geometry type is this feature?

View source: R/is_geom_type.R

is_geom_typeR Documentation

What geometry type is this feature?

Description

A flexible wrapper for sf::st_geometry_type and sf::st_is.

Usage

is_geom_type(x, type = NULL, by_geometry = FALSE, ext = TRUE)

is_point(x, by_geometry = FALSE)

is_multipoint(x, by_geometry = FALSE)

is_line(x, by_geometry = FALSE)

is_multiline(x, by_geometry = FALSE)

is_polygon(x, by_geometry = FALSE)

is_multipolygon(x, by_geometry = FALSE)

Arguments

x

A sf or sfc object passed to sf::st_geometry_type

type

If "POINT", check if geometry type is POINT. Same for all available geometry types; not case sensitive; Default: NULL

by_geometry

Passed to sf::st_geometry_type; defaults to FALSE

ext

For st_geom_type, if ext TRUE and check is NULL, return a list with checks for POINTS, POLYGONS, LINESTRING, and the returned types.

Value

If ext is FALSE and type is NULL, returns vector with geometry types identical to sf::st_geometry_type. If ext is TRUE, returns a list and, if type is not NULL, returns a logical vector.


elipousson/overedge documentation built on Aug. 13, 2022, 7:41 p.m.