vapour_geom_name: Read geometry column name

View source: R/vapour_input_attributes.R

vapour_geom_nameR Documentation

Read geometry column name

Description

There might be one or more geometry column names, or it might be an empty string.

Usage

vapour_geom_name(dsource, layer = 0L, sql = "")

Arguments

dsource

data source name (path to file, connection string, URL)

layer

integer of layer to work with, defaults to the first (0) or the name of the layer

sql

if not empty this is executed against the data source (layer will be ignored)

Details

It might be "", or "geom", or "ogr_geometry" - the last is a default name given when SQL is executed by GDAL but there was no geometry name, and 'SELECT * ' or equivalent was used.

This feature is required by the DBI backend work in RGDALSQL, so that when ⁠SELECT * ⁠ is used we can give a reasonable name to the geometry column which is obtained separately.

Value

character vector of geometry column name/s

Examples

file <- system.file("extdata/tab/list_locality_postcode_meander_valley.tab", package = "vapour")
vapour_geom_name(file)  ## empty string

vapour documentation built on June 22, 2024, 10:01 a.m.