Learn R Programming

lawn (version 0.5.0)

as_feature: Convert a FeatureCollection to a Feature

Description

Convert a FeatureCollection to a Feature

Usage

as_feature(x)

Arguments

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

Run this code
# NOT RUN {
as_feature(lawn_random())
# as_feature(lawn_random("polygons"))
# }

Run the code above in your browser using DataLab