I just figured it out using the DE-9IM.

Brandon Noad
Brandon.Noad@gmail.com
On 2014-02-22 5:53 PM, "Rob Emanuele" <notifications@github.com> wrote:

> In feature/src/main/scala/geotrellis/feature/Line.scala:
>
> > @@ -139,13 +143,7 @@ case class Line(geom: jts.LineString, points: List[Point]) extends Geometry {
> >    def within(p: Polygon): Boolean =
> >      geom.within(p.geom)
> >
> > -  def crosses(p: Point): Boolean =
> > -    geom.crosses(p.geom)
> > -
> > -  def crosses(l: Line): Boolean =
> > -    geom.crosses(l.geom)
> > +  def crosses(d2: Geometry): Boolean =
>
> Strange that the JTS doc says P/L, P/A is a valid case for crosses:
>
> public boolean crosses(Geometry g)Returns true if this geometry crosses the specified geometry.The crosses predicate has the following equivalent definitions:
> The geometries have some but not all interior points in common.The DE-9IM Intersection Matrix for the two geometries isT*T****** (for P/L, P/A, and L/A situations)T*****T** (for L/P, L/A, and A/L situations)0******** (for L/L situations)For any other combination of dimensions this predicate returns false.The SFS defined this predicate only for P/L, P/A, L/L, and L/A situations. JTS extends the definition to apply to L/P, A/P and A/L situations as well. This makes the relation symmetric.
> Parameters:g - the Geometry with which to compare this GeometryReturns:true if the two Geometrys cross.
>
> but if the P/L case were valid, it seems like one of these would return
> true:
>
> scala> import geotrellis.feature._import geotrellis.feature._
> scala> val l = Line( (0.0,0.0), (5.0,5.0) )l: geotrellis.feature.Line = Line(LINESTRING (0 0, 5 5),List(Point(POINT (0 0)), Point(POINT (5 5))))
> scala> val p = Point(1.0,1.0)p: geotrellis.feature.Point = Point(POINT (1 1))
> scala> l.geom.crosses(p.geom)res0: Boolean = false
> scala> p.geom.crosses(l.geom)res1: Boolean = false
>
> Where did you get a definition about crosses that says it must cross
> (contain) both a interior and exterior point of the geometry in order to be
> considered crossing?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/geotrellis/geotrellis/pull/743/files#r9973454>
> .
>