access_vector.Rd
Access to vector data following the MAS data structure.
access_vector(data_id, query = query, bbox = bbox, limit = limit)
data_id | Element of class character. |
---|---|
query | SQL query used to thematically subset a vector dataset. |
bbox | Four-element vector with target bounding box, composed of min. x, min. y, max. x and max. y coordinates. |
limit | Numeric element specifying how many features to read from requested vector data. |
The output consists of the following:
A data.frame with dataset table but without geometries, if geometry is set to FALSE
An sf object, if geometry is set to TRUE (constrained by query, and bbox, if provided)
This function provides access to vector data available in the MAS database. All vector datasets shared by the group are stored as SQLite databases. This facilitates the access to large vector datasets, and the current function simplifies that process. The function looks for the dataset specific through data.id, and returns a subset, depending on user defined criteria. Using query, users can limit the amount of data to read using an SQL query, allowing to e.g. select features based on categorical information in a given data column. Note that these queries are case specific, and should be customized to each dataset. In addition, when provided with a bbox argument, the function will select features that exist within the specified bounding box. Note that all vector datasets within the MAS database is stored in WGS 84, and thus the bbox argument should be composed by latitude/longitude coordinates. To get acquainted with a dataset, users should use the limit argument. This argument determine how many features will be read, allowing users to work with a subset of the dataset.
{}#> NULL