geos_empty: Create empty geometries

View source: R/geos-make.R

geos_emptyR Documentation

Create empty geometries

Description

Create empty geometries

Usage

geos_empty(type_id = "geometrycollection", crs = wk::wk_crs_inherit())

as_geos_type_id(type_id)

## Default S3 method:
as_geos_type_id(type_id)

## S3 method for class 'character'
as_geos_type_id(type_id)

## S3 method for class 'numeric'
as_geos_type_id(type_id)

Arguments

type_id

The numeric type identifier for which an empty should be returned, an object from which one can be extracted using as_geos_type_id() (default to calling geos_type_id()). This is most usefully a character vector with the geometry type (e.g., point, linestring, polygon).

crs

An object that can be interpreted as a CRS. See wk::wk_crs().

Value

A GEOS geometry vector.

Examples

geos_empty(c("point", "linestring", "polygon"))
geos_empty(1:7)
geos_empty(geos_read_wkt(c("POINT (0 1)", "LINESTRING (0 0, 1 1)")))


geos documentation built on June 7, 2023, 6:04 p.m.