Feature request #19943

Extend algorithm only extends, but does not shorten lines

Added by Carlos Cámara almost 2 years ago. Updated almost 2 years ago.

Status:Rejected
Priority:Normal
Assignee:-
Category:Processing/Core
Pull Request or Patch supplied:No Resolution:wontfix
Easy fix?:No Copied to github as #:27765

Description

Currently, there is an algorithm called Extend lines (visit documentation: https://docs.qgis.org/testing/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#extend-lines) which work great for extending lines, but I haven't been able to use it for reducing a line's length.

Example:

Provided a line with length=5m
If I use the following values: start distance = 2, end distance = 2, I get a new line with length=9 (5+2+2). Ok.
If, on the contrary, I use negative values (start distance = -2, end distance = -2), I do not get a new line with length=1 (5-2-2) as expected, but I get a line with the same length as the original one.

History

#1 Updated by Harrissou Santanna almost 2 years ago

This is more a feature request than a bug report I think. I'm not sure that the Extend algorithm is supposed to shorten the lines (at least, I did not read such expectations in the linked documentation).

#2 Updated by Harrissou Santanna almost 2 years ago

  • Status changed from Open to Feedback

#3 Updated by Giovanni Manghi almost 2 years ago

  • Tracker changed from Bug report to Feature request

#4 Updated by Nyall Dawson almost 2 years ago

  • Status changed from Feedback to Rejected
  • Resolution set to wontfix

There is a seperate algorithm for shrinking lines - "line substrings".

#5 Updated by Harrissou Santanna almost 2 years ago

I had looked for it but obviously with wrong tags, hence https://github.com/qgis/QGIS/pull/8025

#6 Updated by Carlos Cámara almost 2 years ago

I am using 3.2.3 and I can't find such line substring algorithm. I haven't found any reference on documentation, neither.

Since I have not used it, I am not sure how that algorithm works, but I would suggest reconsidering reopening this issue as a feature request if it does not work like that:

Imagine that I want to change the length of a line according to a field, which may be positive (extend) or negative (shrink). IMHO it would be great to solve this by using a single tool, not two different ones. I am not a programmer at all, but I cannot see any difference in changing a line's length while keeping its direction, no matter if that length is positive or negative.

Also available in: Atom PDF