And its still not clear to me what matrix would be suitable for selecting practically identical lines. I have tried many possibilities, but I am doing trial and error with educated guesses. Everything I have tried is either not strict enough or too strict and doesn’t select anything.
Please see the attached image for what I mean by practically identical lines. I would like the purple lines to select the orange lines and only the orange lines. (I am only showing similar lines that I would like to select to avoid confusion.)
And its still not clear to me what matrix would be suitable for selecting practically identical lines. I have tried many possibilities, but I am doing trial and error with educated guesses. Everything I have tried is either not strict enough or too strict and doesn’t select anything.
Please see the attached image for what I mean by practically identical lines. I would like the purple lines to select the orange lines and only the orange lines. (I am only showing similar lines that I would like to select to avoid confusion.)
Actually I think that showing us the example with all lines will make it easier to think about solutions.
A small buffer around the selecting lines might help ?
Actually I think that showing us the example with all lines will make it easier to think about solutions.
Hi Moritz,
The purple line can select lines that just cross it like the red line shown in the attached image.
A small buffer around the selecting lines might help ?
Thanks for the suggestion. Perhaps I am doing things wrong, but adding a buffer makes things worse, since the buffer can overlap other unrelated lines that the original line doesn’t.
On Jul 22, 2017, at 4:47 AM, Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:
Actually I think that showing us the example with all lines will make it easier to think about solutions.
Hi Moritz,
The purple line can select lines that just cross it like the red line shown in the attached image.
But you said 'crosses' is not sufficient. Could you explain why ? Again, without a view of the lines you do not want to select, I'm not sure I understand the issue.
A small buffer around the selecting lines might help ?
Thanks for the suggestion. Perhaps I am doing things wrong, but adding a buffer makes things worse, since the buffer can overlap other unrelated lines that the original line doesn't.
Not a trivial problem - Seems to me that there may be multiple steps depending on the precision required.
First, if a line starts and ends at the same place as the target line does that qualify? - it would appear to serve as a good initial screen. If that's too rigorous, maybe add a tolerance of +/- 10 or 100m or whatever is appropriate for the expected precision.
If there are several lines that meet this first test perhaps calculating the distance between each of them and the target (node by node) and selecting the one that results in the minimum cumulative distance?
If the lines are not fully coincidental (i.e. don't start and end at roughly the same points), some segmentation would be required so that these tests could be applied.
BTW - If it wasn't for you I doubt I would have ever have become a GRASS user. I used your CDs with the original pre-compiled Mac binaries for a long time in the early 2000s. Thanks for that. It's been a great ride!
Best
Stu
On Jul 23, 2017, at 5:47 AM, Moritz Lennert <mlennert@club.worldonline.be> wrote:
On 22/07/17 23:58, Jeshua Lacock wrote:
On Jul 22, 2017, at 4:47 AM, Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:
Actually I think that showing us the example with all lines will make it easier to think about solutions.
Hi Moritz,
The purple line can select lines that just cross it like the red line shown in the attached image.
But you said 'crosses' is not sufficient. Could you explain why ? Again, without a view of the lines you do not want to select, I'm not sure I understand the issue.
A small buffer around the selecting lines might help ?
Thanks for the suggestion. Perhaps I am doing things wrong, but adding a buffer makes things worse, since the buffer can overlap other unrelated lines that the original line doesn't.
On Jul 23, 2017, at 3:47 AM, Moritz Lennert <mlennert@club.worldonline.be> wrote:
On 22/07/17 23:58, Jeshua Lacock wrote:
On Jul 22, 2017, at 4:47 AM, Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:
Actually I think that showing us the example with all lines will make it easier to think about solutions.
Hi Moritz,
The purple line can select lines that just cross it like the red line shown in the attached image.
But you said 'crosses' is not sufficient. Could you explain why ?
Equals, crosses and intersects will select the line shown in red - I only want to select the lines that are spatially similar or coincidental; the orange lines from the purple lines.
Again, without a view of the lines you do not want to select, I'm not sure I understand the issue.
In that section, the only line that is a problem is the line shown in red. As you can see, the orange and purple lines are have similar paths, but the red line is only crossed by the purple line. It doesn’t follow the purple line…
On Jul 24, 2017, at 1:55 AM, Jeshua Lacock <jeshua@3DTOPO.com> wrote:
Equals, crosses and intersects will select the line shown in red - I only want to select the lines that are spatially similar or coincidental; the orange lines from the purple lines.
Note that I should I have said parallel instead of coincidental…
On Jul 23, 2017, at 7:14 AM, Stuart Edwards <sedwards2@cinci.rr.com> wrote:
Not a trivial problem - Seems to me that there may be multiple steps depending on the precision required.
First, if a line starts and ends at the same place as the target line does that qualify? - it would appear to serve as a good initial screen. If that's too rigorous, maybe add a tolerance of +/- 10 or 100m or whatever is appropriate for the expected precision.
Hi Stu,
Some lines start and end positions can vary a great deal. As shown in the first image; in the upper left corner the orange line goes well past where the purple line ends.
If there are several lines that meet this first test perhaps calculating the distance between each of them and the target (node by node) and selecting the one that results in the minimum cumulative distance?
Is there a way in grass to select lines based on distances, or are you speaking of a possibly custom solution?
If the lines are not fully coincidental (i.e. don't start and end at roughly the same points), some segmentation would be required so that these tests could be applied.
I tried segmenting the lines at various lengths and I actually get worse results since in some places where they overlap they are removed, but the segments that don’t overlap aren’t removed.
BTW - If it wasn't for you I doubt I would have ever have become a GRASS user. I used your CDs with the original pre-compiled Mac binaries for a long time in the early 2000s. Thanks for that. It's been a great ride!
Hey that’s awesome! Thank you and glad to hear you are still at it! Your name actually looks familiar too.
On Jul 23, 2017, at 3:47 AM, Moritz Lennert <mlennert@club.worldonline.be> wrote:
On 22/07/17 23:58, Jeshua Lacock wrote:
On Jul 22, 2017, at 4:47 AM, Moritz Lennert <mlennert@club.worldonline.be <mailto:mlennert@club.worldonline.be>> wrote:
Actually I think that showing us the example with all lines will make it easier to think about solutions.
Hi Moritz,
The purple line can select lines that just cross it like the red line shown in the attached image.
But you said 'crosses' is not sufficient. Could you explain why ?
Equals, crosses and intersects will select the line shown in red - I only want to select the lines that are spatially similar or coincidental; the orange lines from the purple lines.
Again, without a view of the lines you do not want to select, I'm not sure I understand the issue.
In that section, the only line that is a problem is the line shown in red. As you can see, the orange and purple lines are have similar paths, but the red line is only crossed by the purple line. It doesn’t follow the purple line…
If that line is the only type of problem, then a buffer + a 'within' operation should do the trick, no ?
On 24/07/17 10:04, Jeshua Lacock wrote:
>
>> On Jul 23, 2017, at 7:14 AM, Stuart Edwards <sedwards2@cinci.rr.com> wrote:
>> If there are several lines that meet this first test perhaps calculating the distance between each of them and the target (node by node) and selecting the one that results in the minimum cumulative distance?
>
> Is there a way in grass to select lines based on distances, or are you speaking of a possibly custom solution?
v.distance does provide the possibility to calculate distances between lines. It also allows to retrieve the angle of the line at the closest point. Combined with v.to.db on your selecting line to get the angle of that line you could then compare the two angles. However, the two modules do not seem to calculate the angle in the same way, so you might have to transform angles to be able to compare.
As Stuart already indicated, you might want to split the lines in sufficiently small segments.