Opened 11 years ago
Closed 6 years ago
#2231 closed enhancement (fixed)
v.split not working in expecting way
Reported by: | vasile | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 7.4.2 |
Component: | Vector | Version: | svn-releasebranch70 |
Keywords: | v.split | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
I have try to use v.split to generate segments with a specific length along a line. It seems that at this moment, v.split is calculating the overall length of the line and than is dividing the line in segments as close as possible to the length provided in the "length" parameter. A flag to force v.split to honour the exact length value will be more than welcome.
Attachments (1)
Change History (11)
follow-up: 2 comment:1 by , 10 years ago
Priority: | normal → major |
---|---|
Version: | unspecified → svn-releasebranch70 |
by , 10 years ago
Attachment: | v_split_fixedlength.diff added |
---|
comment:2 by , 10 years ago
Replying to neteler:
A flag to enforce the user provided line length would be much appreciated.
Try the attached patch.
Without the -f flag:
v.split in=line_test out=line_test_split length=10 units=kilometers --o && v.category in=line_test_split out=temp1 op=del cat=-1 --o && v.category in=temp1 out=line_test_cats op=add --o && v.to.db -p map=line_test_cats op=length cat|length 1|9398.52863332647 2|9398.52863332655 3|9398.52863332647 4|9398.52863332647 5|9398.52863332655 6|9398.52863332647 7|9398.52863332656 8|9398.52863332645
With the -f flag:
v.split -f in=line_test out=line_test_split length=10 units=kilometers --o && v.category in=line_test_split out=temp1 op=del cat=-1 --o && v.category in=temp1 out=line_test_cats op=add --o && v.to.db -p map=line_test_cats op=length 1|9999.99999999995 2|10000.0000000001 3|9999.99999999995 4|10000.0000000001 5|9999.99999999995 6|10000 7|9999.99999999995 8|5188.22906661201
comment:4 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
comment:5 by , 8 years ago
Milestone: | 7.0.5 → 7.3.0 |
---|
comment:9 by , 7 years ago
Milestone: | 7.4.1 → 7.4.2 |
---|
comment:10 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
No complaints in the last 3 years, closing as fixed.
A flag to enforce the user provided line length would be much appreciated.