as_feature: Convert a FeatureCollection to a Feature

View source: R/as_feature.R

as_featureR Documentation

Convert a FeatureCollection to a Feature

Description

Convert a FeatureCollection to a Feature

Usage

as_feature(x)

Arguments

x

A data-FeatureCollection.

Details

If there are more than one feature within the featurecollection, each feature is split out into a separate feature, returned in a list. Each feature is assigned a class matching it's GeoJSON data type (e.g., point, polygon, linestring).

See Also

as.feature , which is similarly named, but has a different purpose

Examples

as_feature(lawn_random())
# as_feature(lawn_random("polygons"))

ropensci/lawn documentation built on May 18, 2022, 9:58 a.m.