[GRASS-user] Python Script- Check if a raster exists

Helena Herrera helenaherrera1980 at gmail.com
Mon Sep 27 06:47:00 EDT 2010


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 <helenaherrera1980 at gmail.com>
> *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/23534a7c/attachment.html


More information about the grass-user mailing list