[GRASS-user] Unable to use Command Line Access to GRASS-GIS

Vaclav Petras wenzeslaus at gmail.com
Fri Oct 31 07:54:36 PDT 2014


On Fri, Oct 31, 2014 at 5:10 AM, Artur Bercik <vbubbly21 at gmail.com> wrote:

> Dear Pietro
>
> Thanks for your support with the codes for the bat file.
> I saved it as .bat file, and double clicked on it.
> Is  it enough to change the system variables?
>
> Pietro might know better, but you have to set the variables for the
process which needs them. You have to invoke the GRASS modules in the BAT
script which is setting the variables or in the subprocess called from the
BAT script.

Other possibility is to set the variables in the MS Windows system settings
but this limits you to one particular GRASS installation (others might be
broken) and it is not as safe (concerning stability of other installed
programs) as just setting the variables for a given process.

In other words, the variables are inherited by subprocesses, so starting
the BAT script just sets the variables for the BAT process but other
processes invoked later are independent.

https://trac.osgeo.org/grass/ticket/2424

On Fri, Oct 31, 2014 at 5:10 AM, Artur Bercik <vbubbly21 at gmail.com> wrote:

> Sorry for such a childish question, but being very new I hope you help me.
>

Running GRASS GIS modules outside of the GRASS session is not trivial, so
it is great that you asked for help.

Just try to avoid cross posting next time. Speaking about that, would
somebody (including Arthur) mind to answer the question on GIS SE?

Vaclav

http://lists.osgeo.org/pipermail/grass-dev/2014-October/071463.html
https://gis.stackexchange.com/questions/120433/is-not-it-possible-to-use-grass-gis-through-command-line-access


> Artur
>
> On Fri, Oct 31, 2014 at 5:46 PM, Pietro <peter.zamb at gmail.com> wrote:
>
>> Dear Artur
>>
>> On Thu, Oct 30, 2014 at 10:55 PM, Artur Bercik <vbubbly21 at gmail.com>
>> wrote:
>> > Dear GRASS-GIS users:
>> >
>> > I wanted to use GRASS-GIS through command line access in my Windows PC.
>> >
>> > So, I have installed GRASS GIS 7.0.0beta3 in drive C of my PC.
>> >
>> > But, when I enter the following command in the windows command prompt:
>> >
>> > "C:\Program Files (x86)\GRASS GIS 7.0.0beta3\bin\i.cluster.exe"
>> >
>> > the program can't start because libint-8.dll is missing from your
>> computer.
>> > Try reinstalling the program...
>> >
>> > Please help me what should I do to have the command line access to
>> > GRASS-GIS.
>>
>> If you want to use GRASS without caling GRASS explicity you have to
>> set your environment variables correctly.
>> At work one colleague use this bat files to set the variable and use
>> another python interpreter than the default one:
>>
>>
>> {{{
>> rem => grass70b2 using python XY
>> set GISBASE=C:\GRASS GIS 7.0.0beta2
>>
>> rem => add a environmental variable for pythonxy
>> set PY_XY=C:\Python27
>>
>> rem => reading the env file for pxthonxy
>> call "%GISBASE%\etc\env_xy.bat"
>>
>> cd C:\GRASS GIS 7.0.0beta2\etc\gui\scripts
>>
>> cd "%USERPROFILE%"
>> "%GRASS_PYTHON%" "%GISBASE%\etc\grass70.py" %C:\Users\<<your
>> user>>\Documents\grassdata\<<location>>\<<mapset>>
>>
>>
>> if %ERRORLEVEL% GEQ 1 pause
>> }}}
>>
>> and the env_xy.bat file contains
>>
>> {{{
>> set GRASS_SH=%GISBASE%\msys\bin\sh.exe
>>
>> set GRASS_HTML_BROWSER=firefox
>>
>> rem GRASS_PYTHON=%GISBASE%\extrabin\python.exe
>> set GRASS_PYTHON=%PY_XY%\python.exe
>>
>> rem PYTHONHOME=%GISBASE%\Python27
>> set PYTHONHOME=%PY_XY%
>>
>> set GRASS_PROJSHARE=%GISBASE%\share\proj
>>
>> set PROJ_LIB=%GISBASE%\share\proj
>> set GDAL_DATA=%GISBASE%\share\gdal
>> set GEOTIFF_CSV=%GISBASE%\share\epsg_csv
>>
>> set PATH=%GISBASE%\msys\bin;%PATH%
>> set PATH=%GISBASE%\extrabin;%PATH%
>> set PATH=%GISBASE%\bin;%PATH%
>> }}}
>>
>> I hope this could help to solve your problem.
>>
>> Pietro
>>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141031/cab7a161/attachment.html>


More information about the grass-user mailing list