[GRASS-user] relative path to GISbase in Scripts
Markus Neteler
neteler at osgeo.org
Sat May 14 02:32:53 EDT 2011
On Sat, May 14, 2011 at 2:50 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Johannes Radinger wrote:
>
>> at the moment I am connecting to the sqlite database with the use of a absolute path in a pythonscript like:
...
>
> import grass.script as grass
> import os.path
>
> env = grass.gisenv()
>
> gisdbase = env['GISDBASE']
> location = env['LOCATION_NAME']
> mapset = env['MAPSET']
>
> path = os.path.join(gisdbase, location, mapset, 'sqlite.db')
Added to
http://grass.osgeo.org/wiki/GRASS_and_Python#Path_to_GISDBASE
Markus
More information about the grass-user
mailing list