#include <utils/GrassGISProxy.hpp>
|  | 
|  | GrassGISProxy ()=delete | 
|  | 
|  | GrassGISProxy (const QString &GISBase, const QString &Location, const QString &Mapset="PERMANENT") | 
|  | 
| virtual | ~GrassGISProxy () | 
|  | 
| void | setLocation (const QString &Location) | 
|  | 
| void | setMapset (const QString &Mapset) | 
|  | 
| void | clearTasks () | 
|  | 
| void | appendTask (const QString &Command, const std::map< QString, QString > Arguments={}, const std::vector< QString > Options={}) | 
|  | 
| int | runJob () | 
|  | 
| int | runSingleTask (const QString &Command, const std::map< QString, QString > Arguments={}, const std::vector< QString > Options={}) const | 
|  | 
| void | setOutputFile (const QString &FullPath) | 
|  | 
| void | setErrorFile (const QString &FullPath) | 
|  | 
| const QStringList & | jobLines () const | 
|  | 
| bool | isLocationExist () const | 
|  | 
| bool | createLocation (const QString &EPSG) const | 
|  | 
| std::map< std::string, double > | region () const | 
|  | 
| std::map< std::string, std::string > | gisenv () const | 
|  | 
| std::vector< std::string > | mapsets () const | 
|  | 
◆ GrassGISProxy() [1/2]
  
  | 
        
          | openfluid::utils::GrassGISProxy::GrassGISProxy | ( |  | ) |  |  | delete | 
 
 
◆ GrassGISProxy() [2/2]
      
        
          | openfluid::utils::GrassGISProxy::GrassGISProxy | ( | const QString & | GISBase, | 
        
          |  |  | const QString & | Location, | 
        
          |  |  | const QString & | Mapset = "PERMANENT" | 
        
          |  | ) |  |  | 
      
 
 
◆ ~GrassGISProxy()
  
  | 
        
          | virtual openfluid::utils::GrassGISProxy::~GrassGISProxy | ( |  | ) |  |  | virtual | 
 
 
◆ appendTask()
      
        
          | void openfluid::utils::GrassGISProxy::appendTask | ( | const QString & | Command, | 
        
          |  |  | const std::map< QString, QString > | Arguments = {}, | 
        
          |  |  | const std::vector< QString > | Options = {} | 
        
          |  | ) |  |  | 
      
 
Appends a task to the current GRASS job. 
- Parameters
- 
  
    | [in] | Command | the GRASS command to execute |  | [in] | Arguments | a key-value map of arguments to pass to the GRASS command |  | [in] | Options | options to pass to the GRASS command |  
 
 
 
◆ clearTasks()
  
  | 
        
          | void openfluid::utils::GrassGISProxy::clearTasks | ( |  | ) |  |  | inline | 
 
Clears all appended tasks. 
 
 
◆ createLocation()
      
        
          | bool openfluid::utils::GrassGISProxy::createLocation | ( | const QString & | EPSG | ) | const | 
      
 
Creates the location defined for the current GRASS session, with the given EPSG code 
- Parameters
- 
  
    | [in] | EPSG | the EPSG code for the location |  
 
- Returns
- true if the location has been created, false if it could not be created or if it already exists 
 
 
◆ gisenv()
      
        
          | std::map<std::string,std::string> openfluid::utils::GrassGISProxy::gisenv | ( |  | ) | const | 
      
 
Returns the environment informations as a key-value map, given by the results of the "g.gisenv -n --q" GRASS command 
- Returns
- a key-value map about containing environment informations 
 
 
◆ isAvailable()
  
  | 
        
          | static bool openfluid::utils::GrassGISProxy::isAvailable | ( |  | ) |  |  | static | 
 
 
◆ isLocationExist()
      
        
          | bool openfluid::utils::GrassGISProxy::isLocationExist | ( |  | ) | const | 
      
 
Returns true if the location already exists 
- Returns
- true if the location already exists, false otherwise 
 
 
◆ jobLines()
  
  | 
        
          | const QStringList& openfluid::utils::GrassGISProxy::jobLines | ( |  | ) | const |  | inline | 
 
Returns the current command lines of the job 
- Returns
- a list of command lines 
 
 
◆ mapsets()
      
        
          | std::vector<std::string> openfluid::utils::GrassGISProxy::mapsets | ( |  | ) | const | 
      
 
Returns the list of mapsets in the current location, given by the results of the "g.mapsets separator='\n' -l" GRASS command 
- Returns
- a vector of strings containing the mapsets list 
 
 
◆ region()
      
        
          | std::map<std::string,double> openfluid::utils::GrassGISProxy::region | ( |  | ) | const | 
      
 
Returns the region informations as a key-value map, given by the results of the "g.region -gucep" GRASS command 
- Returns
- a key-value map about containing region informations 
 
 
◆ runJob()
      
        
          | int openfluid::utils::GrassGISProxy::runJob | ( |  | ) |  | 
      
 
Runs a GRASS job made of appended tasks. Once finished, the task queue is cleared. 
- Returns
- the exit code of the execution 
 
 
◆ runSingleTask()
      
        
          | int openfluid::utils::GrassGISProxy::runSingleTask | ( | const QString & | Command, | 
        
          |  |  | const std::map< QString, QString > | Arguments = {}, | 
        
          |  |  | const std::vector< QString > | Options = {} | 
        
          |  | ) |  | const | 
      
 
Runs a single GRASS task. 
- Parameters
- 
  
    | [in] | Command | the GRASS command to execute |  | [in] | Arguments | a key-value map of arguments to pass to the GRASS command |  | [in] | Options | options to pass to the GRASS command |  
 
- Returns
- the exit code of the execution 
 
 
◆ setErrorFile()
  
  | 
        
          | void openfluid::utils::GrassGISProxy::setErrorFile | ( | const QString & | FullPath | ) |  |  | inline | 
 
Sets the file path where the standard error stream will be redirected. If not set or empty, the stream is redirected to a temporary file. 
- Parameters
- 
  
    | [in] | FullPath | the full path for the error file |  
 
 
 
◆ setLocation()
  
  | 
        
          | void openfluid::utils::GrassGISProxy::setLocation | ( | const QString & | Location | ) |  |  | inline | 
 
Sets the current location to use for next GRASS execution 
- Parameters
- 
  
    | [in] | Location | the location directory |  
 
 
 
◆ setMapset()
  
  | 
        
          | void openfluid::utils::GrassGISProxy::setMapset | ( | const QString & | Mapset | ) |  |  | inline | 
 
Sets the current mapset to use for next GRASS execution 
- Parameters
- 
  
    | [in] | Mapset | the mapset directory |  
 
 
 
◆ setOutputFile()
  
  | 
        
          | void openfluid::utils::GrassGISProxy::setOutputFile | ( | const QString & | FullPath | ) |  |  | inline | 
 
Sets the file path where the standard output stream will be redirected. If not set or empty, the stream is redirected to a temporary file. 
- Parameters
- 
  
    | [in] | FullPath | the full path for the output file |  
 
 
 
The documentation for this class was generated from the following file: