You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
According to the docs, v.net.visibility should work in three modes:
v.net.visibility input=input_layer output=graph -> computes the visibility graph between points/vertices of input_layer
v.net.visibility input=input_layer coordinates=x1,y1,x2,y2,... output=graph -> computes the visibility graph between points/vertices of input_layer plus the additional (x1,y1), (x2,y2), ... points
v.net.visibility input=input_layer coordinates=x1,y1,x2,y2,... visibility=old_graph output=new_graph -> copies the previously computed visibility graph and then computes only additional visibility graph between points/vertices of input_layer and the additional (x1,y1), (x2,y2), ... extra points
While modes 1 and 2 seems to work well, mode 3 seems not working properly: the new output graph (new_graph) is always identical to the previously computed visibility graph (old_graph) specified with the visibility parameter as it seems that the coordinates of the point specified with the coordinates parameter are not taken into account.
then the variable n is not properly set to the number of additional extra points (specified with the "coordinates" parameter) before the visibility_points function is called:
Describe the bug
According to the docs, v.net.visibility should work in three modes:
v.net.visibility input=input_layer output=graph
-> computes the visibility graph between points/vertices of input_layerv.net.visibility input=input_layer coordinates=x1,y1,x2,y2,... output=graph
-> computes the visibility graph between points/vertices of input_layer plus the additional (x1,y1), (x2,y2), ... pointsv.net.visibility input=input_layer coordinates=x1,y1,x2,y2,... visibility=old_graph output=new_graph
-> copies the previously computed visibility graph and then computes only additional visibility graph between points/vertices of input_layer and the additional (x1,y1), (x2,y2), ... extra pointsWhile modes 1 and 2 seems to work well, mode 3 seems not working properly: the new output graph (new_graph) is always identical to the previously computed visibility graph (old_graph) specified with the
visibility
parameter as it seems that the coordinates of the point specified with thecoordinates
parameter are not taken into account.To Reproduce
Steps to reproduce the behavior:
Follow Example 4 in v.net.visibility docs:
Expected behavior
The vector map graph is computed then a new visibility graph is computed from it with the extra point 669547.97,208348.20
System description (please complete the following information):
Additional context
It seems to me there is a flaw in the module logic:
in the main function the
n
int variable is initially set to0
grass/vector/v.net.visibility/main.c
Line 36 in 8a9a787
then the variable
n
is not properly set to the number of additional extra points (specified with the "coordinates" parameter) before thevisibility_points
function is called:grass/vector/v.net.visibility/main.c
Line 113 in 8a9a787
so the outermost loop in the
visibility_points
function is never performed:grass/vector/v.net.visibility/visibility.c
Lines 328 to 329 in 8a9a787
Maybe @mmaldacker could give better insights.
The text was updated successfully, but these errors were encountered: