[GRASS-user] Python Script- Check if a raster exists
Christian Schwartze
christian.schwartze at uni-jena.de
Mon Sep 27 08:07:42 EDT 2010
See the notes and output sections of the g.findfile manpage. There you can find additional information how to use the comand in scripts.
http://grass.fbk.eu/gdp/html_grass64/g.findfile.html
Christian.
From: Helena Herrera
Sent: Monday, September 27, 2010 12:47 PM
To: Christian Schwartze ; grass-user at lists.osgeo.org
Subject: Re: [GRASS-user] Python Script- Check if a raster exists
Uhm. I have tried that one with
g.findfile element=raster file=L (I have a raster map named L in my mapset) and I get:
name=
mapset=
fullname=
file=
Which would mean that it doesn't exist.
is there any other way to do this for GRASS-pythons scripts?
On Mon, Sep 27, 2010 at 11:39 AM, Christian Schwartze <christian.schwartze at uni-jena.de> wrote:
Try e.g "g.findfile element=vector file=testmap"
Christian
From: Helena Herrera
Sent: Monday, September 27, 2010 12:25 PM
To: grass-user at lists.osgeo.org
Subject: [GRASS-user] Python Script- Check if a raster exists
Hi
I'm doing a python script and, in a process, I need to check if a raster map exists. My idea is, if this map exists I don't need to create otherwise, I need to create it (v.to.rast). Is there a way to check if a map exists in the current mapset?
Thanks
Helena
------------------------------------------------------------------------------
_______________________________________________
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/20100927/dca4fc89/attachment-0001.html
More information about the grass-user
mailing list