Learn R Programming

ggspatial (version 1.1.9)

df_spatial: Create a ggplot-friendly data frame from a spatial object

Description

Create a ggplot-friendly data frame from a spatial object

Usage

df_spatial(x, ...)

Value

A tibble with coordinates as x and y, features as feature_id, and parts as part_id.

Arguments

x

A spatial object

...

Passed to specific methods

Examples

Run this code
# \donttest{
load_longlake_data(which = c("longlake_osm", "longlake_depthdf"))
df_spatial(longlake_osm)
df_spatial(longlake_depthdf)
df_spatial(as(longlake_depthdf, "Spatial"))
# }

Run the code above in your browser using DataLab