findGeometryColumns: Determine the names of the 'sf' geometry column(s) in a...

View source: R/findGeometryColumns.R

findGeometryColumnsR Documentation

Determine the names of the sf geometry column(s) in a dataframe

Description

Function to determine the names of the sf geometry column(s) in a dataframe.

Usage

findGeometryColumns(sf_dfr, verbose = FALSE)

Arguments

sf_dfr
  • dataframe for which to determine the names of the geometry column(s)

verbose
  • flag to print diagnostic info

Details

The input dataframe does not have to be a simple features (sf) dataframe (i.e., one with class = "sf") to contain sf geometry columns. For example, a sf dataframe (class = "sf") with multiple geometry columns on which st_drop_geometry is ca is called will have the "active" geometry column dropped and the resultant class will be "tbl_df", but the other geometry columns (those that were not the active one) will not have been dropped.

Value

vector of column names


wStockhausen/wtsGIS documentation built on Aug. 23, 2023, 2:31 a.m.