Send grass-windows mailing list submissions to
        grass-windows@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.osgeo.org/mailman/listinfo/grass-windows
or, via email, send a message with subject or body 'help' to
        grass-windows-requ...@lists.osgeo.org

You can reach the person managing the list at
        grass-windows-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grass-windows digest..."


Today's Topics:

   1. Creating Python scripts that call GRASS   functionality from
      outside (Brian Sanjeewa Rupasinghe)
   2. Calling GRASS functions from external Python
      (Brian Sanjeewa Rupasinghe)
   3. Re: Creating Python scripts that call     GRASS   functionality
      from outside (Glynn Clements)
   4. Re: Creating Python scripts that call GRASS functionality
      from outside (Brian Sanjeewa Rupasinghe)
   5. Re: Creating Python scripts that call GRASS functionality
      from outside (Brian Sanjeewa Rupasinghe)


----------------------------------------------------------------------

Message: 1
Date: Thu, 20 Dec 2012 21:20:33 +0000
From: Brian Sanjeewa Rupasinghe <jink...@gmail.com>
To: grass-windows@lists.osgeo.org
Subject: [GRASS-windows] Creating Python scripts that call GRASS
        functionality from outside
Message-ID:
        <CAEMA-4gZ-BwkJoE9h4oCsGY=grec5d65ivynjcbatw+3ylj...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi all,

I just installed GRASS 6.4.3svn and Python 2.7.3 in Windows 7. I need to
call GRASS functions from outside GRASS. I set the environment variables
given
in the grasswiki except:
GISRC= C:\Documents and settings\user\.grassrc6

Because i cannot find this .grassrc6 in the given path or in any other
path. However with other variables, i tried to use from grass.lib
importgrass in Python27 IDLE. Then it gives an error. I think the
variables are
not set correctly. Could somebody help me to sort this out?

Cheers, Brian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/grass-windows/attachments/20121220/f8c68d21/attachment-0001.html>

------------------------------

Message: 2
Date: Fri, 21 Dec 2012 12:21:31 +0000
From: Brian Sanjeewa Rupasinghe <jink...@gmail.com>
To: grass-windows@lists.osgeo.org
Subject: [GRASS-windows] Calling GRASS functions from external Python
Message-ID:
        <caema-4isnyy_inyi9q6+bbe0yjzfet+ocr7pk0pwj6tebk3...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi all,

I have GRASS 6.4.3svn installed in my machine running Windows 7. Also in my
machine i installed Python 2.7.3 for Windows.
Now i need to call GRASS libraries from Python and not within the Python
shell in GRASS GUI itself. I set the environment variables
in the env.bat for this. But connection fails. This is the env.bat i have:

set GISBASE=C:\Program Files\GRASS GIS 6.4.3svn

set HOME=%USERPROFILE%

set LD_LIBRARY_PATH = %GISBASE%\lib

set PATH= %GISBASE%\etc;%PATH%
set PATH=%GISBASE%\Python27;%PATH%
set
PATH=%GISBASE%\lib;%GISBASE%\bin;%GISBASE%\extralib;%GISBASE%\msys\bin;%PATH%
set PATH=C:\Python27;%PATH%

set PYTHONLIB= C:\Python27;%PYTHONLIB%
set PYTHONPATH= %GISBASE%\etc\python;%PYTHONPATH%


rem Environmental variables for GRASS stand-alone installer

set GRASS_WISH=%GISBASE%\extrabin\wish.exe
set GRASS_PYTHON=python


set GRASS_PROJSHARE=%GISBASE%\proj
set GRASS_HTML_BROWSER=explorer
set GRASS_SH=%GISBASE%\msys\bin\sh.exe

set PYTHONHOME=%GISBASE%\Python27
set GDAL_DATA=%GISBASE%\share\gdal
set PROJ_LIB=%GISBASE%\proj
set GEOTIFF_CSV=%GISBASE%\share\epsg_csv

set PATH=%GISBASE%\msys\bin;%PATH%
set PATH=%GISBASE%\extrabin;%GISBASE%\extralib;%PATH%
set PATH=%GISBASE%\tcl-tk\bin;%GISBASE%\sqlite\bin;%GISBASE%\gpsbabel;%PATH%
set PATH=%GISBASE%\bin;%PATH%

rem Path to the python directory --
rem set PYTHONHOME=%GISBASE%\Python27
rem if "x%GRASS_PYTHON%" == "x" set GRASS_PYTHON=python

Can somebody help me in rectifying the problem.

Cheers, Brian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/grass-windows/attachments/20121221/863e6402/attachment-0001.html>

------------------------------

Message: 3
Date: Fri, 21 Dec 2012 13:30:24 +0000
From: Glynn Clements <gl...@gclements.plus.com>
To: Brian Sanjeewa Rupasinghe <jink...@gmail.com>
Cc: grass-windows@lists.osgeo.org
Subject: Re: [GRASS-windows] Creating Python scripts that call  GRASS
        functionality from outside
Message-ID: <20692.25712.619924.979...@cerise.gclements.plus.com>
Content-Type: text/plain; charset=us-ascii


Brian Sanjeewa Rupasinghe wrote:

> I just installed GRASS 6.4.3svn and Python 2.7.3 in Windows 7. I need to
> call GRASS functions from outside GRASS. I set the environment variables
> given
> in the grasswiki except:
> GISRC= C:\Documents and settings\user\.grassrc6
> 
> Because i cannot find this .grassrc6 in the given path or in any other
> path.

A suitable should be created the first time you run GRASS.
Alternatively, you can create the file yourself, e.g.:

GISDBASE: /opt/grass-data
LOCATION_NAME: spearfish57
MAPSET: user1
GRASS_DB_ENCODING: ascii

> However with other variables, i tried to use from grass.lib
> importgrass in Python27 IDLE. Then it gives an error. I think the
> variables are
> not set correctly. Could somebody help me to sort this out?

If GISRC doesn't refer to a valid settings file, nothing will work.

-- 
Glynn Clements <gl...@gclements.plus.com>


------------------------------

Message: 4
Date: Fri, 21 Dec 2012 17:21:36 +0000
From: Brian Sanjeewa Rupasinghe <jink...@gmail.com>
To: Glynn Clements <gl...@gclements.plus.com>,
        grass-windows@lists.osgeo.org
Subject: Re: [GRASS-windows] Creating Python scripts that call GRASS
        functionality from outside
Message-ID:
        <CAEMA-4i_WFyLHKsXB3V3_DTMbA+kW_uqTeRt2h=50pcqx+f...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Could you explain bit more. You mean without .grasssrc6, it will not work.
I created a new location and mapset as you instructed. But where to
find GRASS_DB_ENCODING: ascii in WinGRASS?

On Fri, Dec 21, 2012 at 1:30 PM, Glynn Clements <gl...@gclements.plus.com>wrote:

>
> Brian Sanjeewa Rupasinghe wrote:
>
> > I just installed GRASS 6.4.3svn and Python 2.7.3 in Windows 7. I need to
> > call GRASS functions from outside GRASS. I set the environment variables
> > given
> > in the grasswiki except:
> > GISRC= C:\Documents and settings\user\.grassrc6
> >
> > Because i cannot find this .grassrc6 in the given path or in any other
> > path.
>
> A suitable should be created the first time you run GRASS.
> Alternatively, you can create the file yourself, e.g.:
>
> GISDBASE: /opt/grass-data
> LOCATION_NAME: spearfish57
> MAPSET: user1
> GRASS_DB_ENCODING: ascii
>
> > However with other variables, i tried to use from grass.lib
> > importgrass in Python27 IDLE. Then it gives an error. I think the
> > variables are
> > not set correctly. Could somebody help me to sort this out?
>
> If GISRC doesn't refer to a valid settings file, nothing will work.
>
> --
> Glynn Clements <gl...@gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/grass-windows/attachments/20121221/ccb2a4e9/attachment-0001.html>

------------------------------

Message: 5
Date: Fri, 21 Dec 2012 19:51:03 +0000
From: Brian Sanjeewa Rupasinghe <jink...@gmail.com>
To: Glynn Clements <gl...@gclements.plus.com>,
        grass-windows@lists.osgeo.org
Subject: Re: [GRASS-windows] Creating Python scripts that call GRASS
        functionality from outside
Message-ID:
        <CAEMA-4i5kEzd=no_+v2udybalyko3ru3go+cyag11yb+_cj...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I uninstalled GRASS and then re-installed with spearfish data set with its
spearfish60 location and user1 mapset. Still i cannot see .grassrc6 file
created. Any idea? Please not i use Grass for Windows 7.

On Fri, Dec 21, 2012 at 5:21 PM, Brian Sanjeewa Rupasinghe <
jink...@gmail.com> wrote:

> Could you explain bit more. You mean without .grasssrc6, it will not work.
> I created a new location and mapset as you instructed. But where to
> find GRASS_DB_ENCODING: ascii in WinGRASS?
>
>
> On Fri, Dec 21, 2012 at 1:30 PM, Glynn Clements 
> <gl...@gclements.plus.com>wrote:
>
>>
>> Brian Sanjeewa Rupasinghe wrote:
>>
>> > I just installed GRASS 6.4.3svn and Python 2.7.3 in Windows 7. I need to
>> > call GRASS functions from outside GRASS. I set the environment variables
>> > given
>> > in the grasswiki except:
>> > GISRC= C:\Documents and settings\user\.grassrc6
>> >
>> > Because i cannot find this .grassrc6 in the given path or in any other
>> > path.
>>
>> A suitable should be created the first time you run GRASS.
>> Alternatively, you can create the file yourself, e.g.:
>>
>> GISDBASE: /opt/grass-data
>> LOCATION_NAME: spearfish57
>> MAPSET: user1
>> GRASS_DB_ENCODING: ascii
>>
>> > However with other variables, i tried to use from grass.lib
>> > importgrass in Python27 IDLE. Then it gives an error. I think the
>> > variables are
>> > not set correctly. Could somebody help me to sort this out?
>>
>> If GISRC doesn't refer to a valid settings file, nothing will work.
>>
>> --
>> Glynn Clements <gl...@gclements.plus.com>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/grass-windows/attachments/20121221/ebf4bd38/attachment-0001.html>

------------------------------

_______________________________________________
grass-windows mailing list
grass-windows@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-windows


End of grass-windows Digest, Vol 68, Issue 2
********************************************

Reply via email to