[GRASS-user] were is grass looking for the input tif - r.viewshed run from bash script

karsten karsten at terragis.net
Thu Nov 2 02:14:46 PDT 2017


Yes got it working with Grass 7.0.3 (as 7.2.2 fails with "Error in
`r.viewshed': free(): invalid pointer:" 
plus a Backtrace and Memory map like in
<https://trac.osgeo.org/grass/ticket/3285>
https://trac.osgeo.org/grass/ticket/3285 )
Thanks
Karsten

  _____  

From: neteler.osgeo at gmail.com [mailto:neteler.osgeo at gmail.com] On Behalf Of
Markus Neteler
Sent: Donnerstag, 2. November 2017 09:38
To: karsten vennemann
Cc: GRASS user list
Subject: Re: [GRASS-user] were is grass looking for the input tif -
r.viewshed run from bash script



On Nov 2, 2017 6:45 AM, "karsten" <karsten at terragis.net> wrote:
>
> I am trying to run r.viewshed from a bash script on ubuntu following
> instruction on https://grasswiki.osgeo.org/wiki/GRASS_and_Shell "GRASS
Batch
> jobs". I got an error that my input tif file is not found.
> I tried specifying the full path to file but get then the Error Illegal
> filename
>
</var/www/mapdata/ilpoe/layers/results/dem30m_cut_852af91d4fe5fd938fa57893e5
> 991dfe.tif> Character </> not allowed.
> My 3 line script is below:
> --------------
> export GRASS_MESSAGE_FORMAT=plain
> g.region n=6446299.8941608080640435 s=5942051.4022588636726141
> w=779220.9745125266490504 e=1224529.8597663976252079 res=30
> r.viewshed -b input="/var/www/results/dem30m.tif"
> output="/var/www/results/vis.tif"

You need to import or register the map first. Likewise for the export.

See for an example
https://grass.osgeo.org/grass72/manuals/r.external.html#processing-workflow-
without-data-import-and-export

Best
Markus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20171102/15987720/attachment.html>


More information about the grass-user mailing list