PROJ C++ API
Public Member Functions | Static Public Member Functions | List of all members
osgeo::proj::io::DatabaseContext Class Reference

Database context. More...

#include <io.hpp>

Public Member Functions

const std::string & getPath () const
 Return the path to the database.
 
std::set< std::string > getAuthorities () const
 Return the list of authorities used in the database.
 
std::vector< std::string > getDatabaseStructure () const
 Return the list of SQL commands (CREATE TABLE, CREATE TRIGGER, CREATE VIEW) needed to initialize a new database.
 

Static Public Member Functions

static DatabaseContextNNPtr create ()
 Instanciate a database context, using the default proj.db file. More...
 
static DatabaseContextNNPtr create (const std::string &databasePath)
 Instanciate a database context from a full filename. More...
 
static DatabaseContextNNPtr create (const std::string &databasePath, const std::vector< std::string > &auxiliaryDatabasePaths)
 Instanciate a database context from a full filename, and attach auxiliary databases to it. More...
 

Detailed Description

Database context.

A database context should be used only by one thread at a time.

Member Function Documentation

DatabaseContextNNPtr osgeo::proj::io::DatabaseContext::create ( )
static

Instanciate a database context, using the default proj.db file.

It will be searched in the directory pointed by the PROJ_LIB environment variable. If not found, on Unix builds, it will be then searched first in the pkgdatadir directory of the installation prefix.

This database context should be used only by one thread at a time.

Exceptions
FactoryException
DatabaseContextNNPtr osgeo::proj::io::DatabaseContext::create ( const std::string &  databasePath)
static

Instanciate a database context from a full filename.

This database context should be used only by one thread at a time.

Parameters
databasePathPath and filename of the database. Might be empty string for the default rules to locate the default proj.db
Exceptions
FactoryException
DatabaseContextNNPtr osgeo::proj::io::DatabaseContext::create ( const std::string &  databasePath,
const std::vector< std::string > &  auxiliaryDatabasePaths 
)
static

Instanciate a database context from a full filename, and attach auxiliary databases to it.

This database context should be used only by one thread at a time.

Parameters
databasePathPath and filename of the database. Might be empty string for the default rules to locate the default proj.db
auxiliaryDatabasePathsPath and filename of auxiliary databases;
Exceptions
FactoryException

The documentation for this class was generated from the following files: