<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.18817"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>It failed with all 3 options I tried:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT size=2
face=Arial><FONT color=#000080>using r.external for linking the dem ( as in
</FONT><A
href="https://trac.osgeo.org/grass/ticket/3285">https://trac.osgeo.org/grass/ticket/3285</A><FONT
color=#000080> )</FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>but also failed the same way with </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>r.in.gdal </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>OR using </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>r.import.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>The error messages in all case where <SPAN
class=254300521-01112017><FONT size=2 face=Arial><FONT color=#000080>"Error in
`r.viewshed': free(): invalid pointer:"
</FONT></FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial><SPAN class=254300521-01112017><FONT size=2 face=Arial><FONT
color=#000080>plus a Backtrace and Memory map like in </FONT><A
href="https://trac.osgeo.org/grass/ticket/3285">https://trac.osgeo.org/grass/ticket/3285</A></FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>I can't provide the exact ones of those any more because I
have deinstalled grass7.2.2 as I could not use it for this
task.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#000080
size=2 face=Arial>Cheers</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=254300521-01112017><FONT color=#0000ff
size=2 face=Arial><FONT
color=#000080>Karsten</FONT> <BR></DIV></FONT></SPAN>
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Markus Metz
[mailto:markus.metz.giswork@gmail.com] <BR><B>Sent:</B> Mittwoch, 1. November
2017 21:52<BR><B>To:</B> karsten<BR><B>Cc:</B> grass-user<BR><B>Subject:</B> Re:
[GRASS-user] where is grass looking for the input tif - r.viewshed run from bash
script<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>
<DIV>
<DIV><BR><BR>On Wed, Nov 1, 2017 at 9:49 PM, karsten <<A
href="mailto:karsten@terragis.net">karsten@terragis.net</A>>
wrote:<BR>><BR>><BR>> For reference for other beginners here:<BR>> I
did not import the file nor link it externally, thus that step was<BR>>
missing.<BR>> I got it to work and the updated script is:<BR>>
-------------<BR>><BR>> export GRASS_MESSAGE_FORMAT=plain<BR>><BR>>
r.in.gdal input="/var/www/mapdata/dem30m.tif" output=digim<BR>><BR>>
g.region raster=digim<BR>><BR>> r.viewshed -b input=digim
output=vis1.tif<BR>> coordinates=1127369.7301780644,6268333.160068306
observer_elevation=120<BR>> max_distance=1800 memory=500<BR>><BR>>
----------------<BR>> However the last step failed in Grass 7.2.2 on ubuntu
Xenial,<BR><BR></DIV>How did it fail? Can you provide the error
messages?<BR><BR></DIV>Markus M<BR>
<DIV>
<DIV><BR>> thus I needed<BR>> to inmstall an older version, and in Grass
7.0.3 it is working fine.<BR>><BR>> Cheers<BR>>
Karsten<BR>><BR>><BR>> -----Original Message-----<BR>> From: karsten
[mailto:<A href="mailto:karsten@terragis.net">karsten@terragis.net</A>]<BR>>
Sent: Mittwoch, 1. November 2017 20:02<BR>> To: '<A
href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</A>'<BR>>
Subject: where is grass looking for the input tif - r.viewshed run from
bash<BR>> script<BR>><BR>> I am trying to run r.viewshed from a bash
script on ubuntu following<BR>> instruction on <A
href="https://grasswiki.osgeo.org/wiki/GRASS_and_Shell">https://grasswiki.osgeo.org/wiki/GRASS_and_Shell</A>
"GRASS Batch<BR>> jobs". I got an error that my input tif file is not
found.<BR>> I tried specifying the full path to file but get then the Error
Illegal<BR>> filename<BR>>
</var/www/mapdata/ilpoe/layers/results/dem30m_cut_852af91d4fe5fd938fa57893e5<BR>>
991dfe.tif> Character </> not allowed.<BR>> My 3 line script is
below:<BR>> --------------<BR>> export GRASS_MESSAGE_FORMAT=plain<BR>>
g.region n=6446299.8941608080640435 s=5942051.4022588636726141<BR>>
w=779220.9745125266490504 e=1224529.8597663976252079 res=30 r.viewshed
-b<BR>> input="/var/www/results/dem30m.tif"
output="/var/www/results/vis.tif"<BR>>
coordinates=1127369.7301780644,6268333.160068306 observer_elevation=120<BR>>
max_distance=1800 memory=2000<BR>> ------------<BR>><BR>> Where is
Grass looking for the input tif and how do I need to specify that
?<BR>><BR>> Thanks<BR>><BR>> Karsten Vennemann<BR>> Terra GIS
LTD<BR>><BR>> _______________________________________________<BR>>
grass-user mailing list<BR>> <A
href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</A><BR>>
<A
href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</A><BR><BR></DIV></DIV></DIV></BODY></HTML>