39#ifndef __OPENFLUID_UTILS_GRASSGISPROXY_HPP__
40#define __OPENFLUID_UTILS_GRASSGISPROXY_HPP__
58 std::string m_GISBase;
60 std::string m_Location;
64 std::vector<std::string> m_JobLines;
66 std::string m_OutputFile;
68 std::string m_ErrorFile;
70 static void findGrassGISProgram();
72 static std::string getCommandLine(
const std::string& Command,
73 const std::map<std::string,std::string>& Arguments = {},
74 const std::vector<std::string>& Options = {});
76 static std::string writeJobFile(
const std::vector<std::string>& Lines,
const std::string& DirPath);
78 int executeGrassJob(
const std::string& JobFilePath)
const;
80 int executeGrassJobReturningData(
const std::string& JobFilePath, std::vector<std::string>& Lines)
const;
87 GrassGISProxy(
const std::string& GISBase,
const std::string& Location,
const std::string& Mapset =
"PERMANENT");
99 m_Location = Location;
126 const std::map<std::string,std::string>& Arguments = {},
127 const std::vector<std::string>& Options = {});
143 const std::map<std::string,std::string>& Arguments = {},
144 const std::vector<std::string>& Options = {})
const;
153 m_OutputFile = FullPath;
163 m_ErrorFile = FullPath;
196 std::map<std::string,double>
region()
const;
203 std::map<std::string,std::string>
gisenv()
const;
Definition GrassGISProxy.hpp:55
void appendTask(const std::string &Command, const std::map< std::string, std::string > &Arguments={}, const std::vector< std::string > &Options={})
bool createLocation(const std::string &EPSG) const
GrassGISProxy(const std::string &GISBase, const std::string &Location, const std::string &Mapset="PERMANENT")
std::vector< std::string > mapsets() const
int runSingleTask(const std::string &Command, const std::map< std::string, std::string > &Arguments={}, const std::vector< std::string > &Options={}) const
void setMapset(const std::string &Mapset)
Definition GrassGISProxy.hpp:106
void setLocation(const std::string &Location)
Definition GrassGISProxy.hpp:97
void clearTasks()
Definition GrassGISProxy.hpp:114
void setOutputFile(const std::string &FullPath)
Definition GrassGISProxy.hpp:151
std::map< std::string, std::string > gisenv() const
bool isLocationExist() const
const std::vector< std::string > & jobLines() const
Definition GrassGISProxy.hpp:170
void setErrorFile(const std::string &FullPath)
Definition GrassGISProxy.hpp:161
std::map< std::string, double > region() const
static bool isAvailable()
Definition ProgramProxy.hpp:54
#define OPENFLUID_API
Definition dllexport.hpp:86
Definition ApplicationException.hpp:47