[GRASS-user] test if raster/vector exists (in Perl)

M S mseibel at gmail.com
Tue Aug 14 12:41:31 EDT 2007


I have a Perl program that loops through the r.lake module, and captures
output.  In the program, there are a few instances where I would like to
test if a given raster already exists.  In perl, its something like this to
test if a file exists ... if (-e "filename") { do stuff }.

is there a way to use this feature against a raster?  Otherwise, I was going
to do something like r.info and pipe the output to a file.  then search that
the file for some keyword indicating it exists or doesnt exist.

any other ideas or approaches?


thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20070814/76c4dd9e/attachment.html


More information about the grass-user mailing list