Opened 14 years ago

Closed 6 years 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 14 years ago.
Raster 26x37 (clos-rows)
v35.txt (780 bytes ) - added by akbgf 14 years ago.
ASCII vector: 1 line, 1 centroid
grass.diff (294 bytes ) - added by yawl 14 years ago.
Patch

Download all attachments as: .zip

Change History (11)

by akbgf, 14 years ago

Attachment: r35.txt added

Raster 26x37 (clos-rows)

by akbgf, 14 years ago

Attachment: v35.txt added

ASCII vector: 1 line, 1 centroid

comment:1 by yawl, 14 years ago

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

by yawl, 14 years ago

Attachment: grass.diff added

Patch

comment:2 by mmetz, 14 years ago

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

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

comment:3 by neteler, 10 years ago

Milestone: 7.0.06.4.5

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

in reply to:  3 comment:4 by mmetz, 10 years ago

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 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:6 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:7 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:8 by martinl, 6 years ago

Milestone: 7.0.77.4.2
Resolution: fixed
Status: newclosed

Seems to be fixed in G74.

Note: See TracTickets for help on using tickets.