Quantcast

Re: Name for line intersects

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Name for line intersects

Jody Garnett
Tricky one; so what you are asking for is if the interior of the line
has any a D>0 interaction with another geometry.  Since "line
intersects" was the first thing that popped into your head; and nothing
substantially better has come forward....

Still let us put that in a code example and see what it reads like...

return line1.lineIntersects( line2 );

You may want to swap that around so someone reaching for an intersects
relationship is presented with a choice by code completion....

return line1.intersectsLine( line2 );

I actually like this more; we have noun / relationship / adjective ...
although with that in mind Martin's suggestion is more correct.

return line1.intersectsLinearly( line2 );

So I am going to recommend the above.
Jody

Paul Austin wrote:

> I'm trying to think of a name to describe and intersection between two
> lines, where the intersection between the two is a line (so it ignores
> any point intesections). This would be detected using the following.
>
> IntersectionMatrix relate = line1.relate(line2);
> if (relate.get(0, 0) == Dimension.L) {
>   return true
> } else {
>   return false;
> }
>
> Can anyone think of a catchy name to describe an operator implementing
> this? Something like intersectsLine.
>
> Cheers,
> Paul
> ------------------------------------------------------------------------
>
> _______________________________________________
> jts-devel mailing list
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/jts-devel
>  

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Loading...