<div dir="ltr">Dear all, <div><br></div><div>I am using r.surf.nnbathy (on GRASS 7.4)</div><div><br></div><div>Using a projected location (meters) I obtain a result</div><div><br></div><div>Using lat/lon location I see the following error: </div><div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>Traceback (most recent call last):<br>  File<br>"/home/roberto/.grass7/addons/scripts/r.surf.nnbathy", line<br>80, in <module><br>    main()<br>  File<br>"/home/roberto/.grass7/addons/scripts/r.surf.nnbathy", line<br>74, in main<br>    obj = Nnbathy_raster(options)<br>  File "/home/roberto/.grass7/addons/etc/v.surf.nnbathy/nnba<br>thy.py", line 107, in __init__<br>    Nnbathy.__init__(self, options)<br>  File "/home/roberto/.grass7/addons/etc/v.surf.nnbathy/nnba<br>thy.py", line 13, in __init__<br>    self.region()<br>  File "/home/roberto/.grass7/addons/etc/v.surf.nnbathy/nnba<br>thy.py", line 20, in region<br>    reg_N = float(kv['north'])<br>ValueError: invalid literal for float(): 47:00:29.111155N</blockquote><div><br></div><div><br></div><div><br></div><div>I think the error is due to the <a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.surf.nnbathy/nnbathy.py">https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.surf.nnbathy/nnbathy.py</a> file and in particular to the region() function</div><div><br></div><div><div><div><span style="white-space:pre">       </span>  </div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><div>reg = grass.read_command("g.region", flags='p')</div></div></div></div><div><div><div><div> kv = grass.parse_key_val(reg, sep=':')</div></div></div></div><div><div><div><div>reg_N = float(kv['north'])</div></div></div></div><div><div><div><div>reg_W = float(kv['west'])</div></div></div></div><div><div><div><div>reg_S = float(kv['south'])</div></div></div></div><div><div><div><div>reg_E = float(kv['east'])</div></div></div></div><div><div><div><div>nsres = float(kv['nsres'])</div></div></div></div><div><div><div><div> ewres = float(kv['ewres'])</div></div></div></div></blockquote><div><div><div><br></div><div>perhaps this can be a solution:</div><div><br></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div>in_region = gscript.region()</div></div></div><div><div><div>reg_E=float(in_region['e'])</div></div></div><div><div><div>reg_W=float(in_region['w'])</div></div></div><div><div><div>reg_N=float(in_region['s'])</div></div></div><div><div><div>reg_S=float(in_region['s'])</div></div></div><div><div>nsres = float(in_region['nsres'])</div></div><div><div>ewres = float(in_region['ewres'])</div></div></blockquote><div><div><br></div><div>If you agree I will do some test and I can update the add-on</div><div><br></div><div>Any suggestions? </div><div><br></div><div>Thanks in advanced for your help</div><div>R <br></div></div></div>