Skip to contents

GRASS vectors can be lined to one or more attribute tables, or "databases.". This function tests to see if the vector does indeed have a database. This function is typically used by developers.

Usage

.vHasDatabase(x)

Arguments

x

A GVector or the sources() name of a vector in GRASS.

Value

Logical.

Examples

if (grassStarted()) {

madRivers <- fastData("madRivers")
rivers <- fast(madRivers)

.vCats(rivers)
.vHasDatabase(rivers)
.vAsDataTable(rivers)
.vRecat(rivers) # dangerous--re-categorizes geometries!
.vValidCats(rivers)

.vDetachDatabase(rivers) # dangerous--detaches database!
.vAttachDatabase(rivers)

# Ensure we don't use this for other examples!
.rm(rivers) # delete in GRASS
rm(rivers) # delete in R

}