da_read: Read Table with arcpy.da

Description Usage Arguments Details Value Examples

View source: R/utils.r

Description

Read a table (e.g. attribute table of a layer) with the arcpy.da module.

Usage

1
da_read(table.path, fields)

Arguments

table.path

The file path to the table.

fields

A vector of field names or column indices to retrieve.

Details

This implementation may be faster than accessing the @data slot of an object created from rgdal::readOGR in cases where there are a very large number of features. An additional advantage of da_read is that it can read raster attribute tables and stand-alone tables stored in file geodatabases, which is not supported by rgdal::readOGR.

Value

a dataframe with columns corresponding to fields.

Examples

1
2
3
4
5
6
## Not run: 
layer = "path/to/table"
fields = c("VALUE", "NOTE")
da_read(layer, fields)

## End(Not run)

mkoohafkan/arcpyrextra documentation built on May 23, 2019, 2:02 a.m.