[Qgis-developer] Please tell me ho has coded qgsgrass.cpp !
Martin Dobias
wonder.sk at gmail.com
Thu Mar 20 09:27:36 EDT 2008
On Wed, Mar 19, 2008 at 2:50 PM, Nicolas B. <piklas at gmail.com> wrote:
>
> For example, i'm trying to call r.stats command from the rxvt shell with the
> following code:
> ( i want to get the raster cells values written in a txt file)
>
> ******************************************************************************************************
> process = QProcess()
> exe =QString("rxvt.exe")
> arg=QStringList("r.stats -1gn input=mnt10m output='C:/test' fs=;");
> arg.append("@ARGS_PARSED@")
> env = process.systemEnvironment()
> env.append("$GISDBASE='D:/DATA';")
> env.append("$LOCATION_NAME='neff';")
> env.append("$MAPSET='neffmap';")
> process.setEnvironment(env)
> process.start(exe,arg)
>
Hi,
I'm just passing by, but I guess you shouldn't use dollar sign when
specifying env. variables, also semicolon shouldn't be needed. And I
guess also the list of arguments should be really a list and not just
one argument with parameters joined by space.
Martin
More information about the Qgis-developer
mailing list