aRTdb {aRT} | R Documentation

## Class aRTdb

### Description

Class that manipulates a database. Data is stored in layers (geometries and their attributes) or external tables (attributes not directly connected with geometries). `aRTdb` objects consume more memory then any other object of this package, because it stores all themes, layers and table definitions, and these objects store just a pointer to its “father”. We recommend to work with only one object of this class per time.

### Objects from the Class

Objects can be created by calls of the form `new("aRTdb", aRTconn, dbname, create)`. To avoid creating objects this way, there are two functions of class `aRTconn`: `createDb` and `openDb`.

### Arguments

aRTconn
  Object of aRTconn class.
dbname
  Database name.
create
  Create a new database when create=TRUE, and open a existing database when create=FALSE. The default is create=FALSE.

### Extends

Class `aRTcomponent`, directly.

### Methods

createLayer:
  Creates a new layer returns it.
createView:
  Creates an empty View in the database.
deleteLayer:
  Delete a layer in the database.
deleteTheme:
  Delete a theme in the database.
deleteView:
  Delete a view in the database.
importShape:
  Imports a shapefile to the database.
openLayer:
  Opens an existent layer.
openTheme:
  Opens an existent theme. (Themes can be created only from layers.)
showLayers:
  Shows all the available layers.
showThemes:
  Shows all the available themes.
showViews:
  Show all the available views.
summary:
  Some information about the database.

### Environments

An `aRTenv` is the set of themes and views of a user in a TerraLib database. Layers in a database are visible by all users that have read permission in the database, but each user has it owns views and themes. Therefore it can be useful to manipulate a user's environment, as for example save in a file, load and remove.

`aRTloadEnv`, `aRTsaveEnv`, `aRTclearEnv`, `aRTgetEnv` and `aRTremoveEnv` manipulate environments without any aRT object as argument.

Views are only destinate to TerraView users. It has no importance inside R.

### Author(s)

Marcos Aurelio Carrero, Pedro Ribeiro de Andrade Neto

### See Also

See `aRTdb-METHOD` for a method of this class or `CLASSNAME-class` for links to other classes.

[Package aRT version 0.4-0 Index]