<div dir="ltr"><div dir="ltr"><div>Hi Markus,</div><div>Sorry I am getting back to a conversation we had more than a month ago. I found the error on v.distance in R.</div><div><br></div><div>FYI, I run the same program under GRASS 7.8.3 with no problem, although when the v.distance function is called from R under GRASS <a href="http://7.9.dev" target="_blank">7.9.dev</a> I get the following error:</div><div><br></div><div><b>"ERROR: At least one of the following options is required: <output>, <table> and <-p>>"</b></div><div><b><br></b></div><div>Here is the code I use in R:</div><div><b><br></b></div><div>execGRASS("v.distance",parameters= list(<br> from = NewLayerName,<br> from_layer = "1",<br> from_type = "point",<br> to = BasePointLayer,<br> to_layer = "1",<br> to_type = "point",<br> dmax = -1, <br> dmin = -1,<br> upload = "to_attr",<br> column = NewRefColumn,<br> to_column = UniqueID2BeTaken,<br> separator = "tab"),<br> flags=c('overwrite','verbose')<br>)</div><div><br></div><div>I still want to upload the results to the selected column, not to a new table. How can I make it work in GRASS <a href="http://7.9.dev" target="_blank">7.9.dev</a>?</div><div>by the way, the GRASS 7.8.3 is on my ubuntu computer, while the GRASS <a href="http://7.9.dev">7.9.dev</a> is running in a docker container with the same OS. </div><div><br></div><div>I would appreciate to learn what should I add exactly to the command to make it work with the new version of GRASS. If there is a bug that needs some work , probably I should create a new container with the previous version of GRASS. what do you recommend?</div><div><br></div><div><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div>Kind regards,</div><div><br></div><div>Mehrdad</div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 25, 2020 at 5:12 AM Markus Neteler <<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Mehrdad,<br>
<br>
On Mon, May 25, 2020 at 10:24 AM Mehrdad Varedi <<a href="mailto:varedi@waterlix.com" target="_blank">varedi@waterlix.com</a>> wrote:<br>
><br>
> Hi Everyone,<br>
> I can run the R program with no problem from a Shiny app I have in Rstudio. Although when running the program from a container, I receive an error when running the v.distance and program halts.<br>
><br>
> here is the error dump I receive, not so much informative, although I appreciate to know if you have ever seen such an issue: (FYI many other grass functions are executed before this error happens)<br>
><br>
> Warning: Error in execGRASS: The command:<br>
> v.distance --overwrite --verbose from=WM_End from_layer=1 from_type=point to=WM_start to_layer=1 to_type=point dmax=0.5 dmin=-1 upload=to_attr column=LinkedWMID to_column=WMAINID separator=tab<br>
> produced an error (1) during execution:<br>
> Finds the nearest element in vector map 'to' for elements in vector map 'from'.<br>
><br>
> Usage:<br>
> v.distance [-pas] from=name [from_layer=string]<br>
> [from_type=string[,string,...]] to=name [to_layer=string]<br>
> [to_type=string[,string,...]] [output=name] [dmax=value] [dmin=value]<br>
> upload=string[,string,...] [column=name[,name,...]] [to_column=name]<br>
> [table=name] [separator=character] [--overwrite] [--help] [--verbose]<br>
> [--quiet] [--ui]<br>
><br>
> Flags:<br>
> -p Print output to stdout, don't update attribute table<br>
> -a Calculate distances to all features within the threshold<br>
> -s Print output as square matrix (only possible for one single upload variable)<br>
><br>
> Parameters:<br>
> from Name of existing vector map (from)<br>
> from_layer Laye [... truncated]<br>
<br>
^--- and chance to expand this "truncated"? Exactly therein you will<br>
find the error message :-)<br>
It is in the last line of the truncated part.<br>
<br>
Best,<br>
Markus<br>
</blockquote></div></div>