Opened 9 years ago

Closed 14 months ago

#1231 closed defect (fixed)

v.parallel2 cycles

Reported by: akbgf Owned by: grass-dev@…
Priority: normal Milestone: 7.4.2
Component: Vector Version: svn-trunk
Keywords: v.parallel2, patch Cc:
CPU: x86-32 Platform: Linux

Description

GRASS-7.0 r44543

There are occasions that v.parallel can not create parallel lines to a line, v.parallel cycles forever.

Attached please find a small raster r35.txt and vector v35.txt which has a line and a centroid. The following sequence of commands will create an infinite loop:

r.in.ascii -i --overwrite input=r35.txt output=r35
v.in.ascii --overwrite input=v35.txt output=v35 format=standard fs='space'
v.parallel -b input=v35 layer=-1 output=v35b distance=10 side=both --overwrite

Andres Kuusk, Tartu Observatory, Estonia, andres@…

Attachments (3)

r35.txt (4.0 KB) - added by akbgf 9 years ago.
Raster 26x37 (clos-rows)
v35.txt (780 bytes) - added by akbgf 9 years ago.
ASCII vector: 1 line, 1 centroid
grass.diff (294 bytes) - added by yawl 9 years ago.
Patch

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by akbgf

Attachment: r35.txt added

Raster 26x37 (clos-rows)

Changed 9 years ago by akbgf

Attachment: v35.txt added

ASCII vector: 1 line, 1 centroid

comment:1 Changed 9 years ago by yawl

Keywords: patch added

The function

void link__set_next(VOID_T * a, VOID_T * b) 

in lib/linkm/next.c corrupted the

struct Slink
{
    double x;
    struct Slink *next;
};

defined in lib/vector/Vlib/poly.c by modifying x instead of *next.

The patch is attached as grass.diff

Changed 9 years ago by yawl

Attachment: grass.diff added

Patch

comment:2 Changed 9 years ago by mmetz

Keywords: v.parallel2 added; v.parallel removed
Summary: v.parallel cyclesv.parallel2 cycles

Applies to v.parallel2, not to v.parallel.

comment:3 Changed 5 years ago by neteler

Milestone: 7.0.06.4.5

v.parallel2 only exists in GRASS 6, downgrading milestone.

comment:4 in reply to:  3 Changed 5 years ago by mmetz

Milestone: 6.4.57.0.0

Replying to neteler:

v.parallel2 only exists in GRASS 6, downgrading milestone.

v.parallel2 has been renamed to v.parallel in GRASS 7, restoring milestone.

comment:5 Changed 4 years ago by martinl

Milestone: 7.0.07.0.5

comment:6 Changed 3 years ago by neteler

Milestone: 7.0.57.0.6

comment:7 Changed 21 months ago by neteler

Milestone: 7.0.67.0.7

comment:8 Changed 14 months ago by martinl

Milestone: 7.0.77.4.2
Resolution: fixed
Status: newclosed

Seems to be fixed in G74.

Note: See TracTickets for help on using tickets.