vapour_report_fields: Read feature field types.

View source: R/vapour_input_attributes.R

vapour_report_fieldsR Documentation

Read feature field types.

Description

Obtains the internal type-constant name for the data attributes in a source.

Usage

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

vapour_report_attributes(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

Use this to compare the interpreted versions converted into R types by vapour_read_fields.

This and vapour_read_fields() are aliased to older versions named 'vapour_report_attributes()' and 'vapour_read_attributes()', but "field" is a clearer and more sensible name (in our opinion).

These are defined for the enum OGRFieldType in GDAL itself. https://gdal.org/doxygen/ogr__core_8h.html#a787194bea637faf12d61643124a7c9fc

Value

named character vector of the GDAL types for each field

Examples

file <- "list_locality_postcode_meander_valley.tab"
mvfile <- system.file(file.path("extdata/tab", file), package="vapour")
vapour_report_fields(mvfile)

## modified by sql argument
vapour_report_fields(mvfile,
  sql = "SELECT POSTCODE, NAME FROM list_locality_postcode_meander_valley")

vapour documentation built on April 11, 2023, 5:59 p.m.