Learn R Programming

geometr (version 0.2.10)

gc_sf: Transform a spatial object to class sf

Description

Transform a spatial object to class sf

Usage

gc_sf(input, ...)

# S4 method for geom gc_sf(input = NULL)

Arguments

input

the object to transform to class sf.

...

other arguments.

Value

If input is a geom and has attributes other than fid and gid, a "Simple feature collection", otherwise a "Geometry set". Several features of the geom are returned as MULTI* feature, when they have gid and optionally other attributes in common, otherwise they are returned as a single simple feature.

See Also

Other spatial classes: gc_geom(), gc_raster(), gc_sp()

Examples

Run this code
# NOT RUN {
gc_sf(input = gtGeoms$point)

gc_sf(input = gtGeoms$line)

gc_sf(input = gtGeoms$polygon)
# }

Run the code above in your browser using DataLab