Hello.

I have two LineString depth contours that I want to check for crossing. For 
this domain, overlap/touch is fine, but not crossing.

The following junit-formatted example show two LineStrings that touch each 
other in (2 2). This is reported as a crossing by 
LineString#crosses(LineString), but for my domain this is not a cross.

    public void testCrosses() throws ParseException {
        WKTReader r = new WKTReader();
        LineString ls1 = (LineString) r.read("LINESTRING (1 2, 3 2)");
        LineString ls2 = (LineString) r.read("LINESTRING (1 1, 2 2, 3 1)");
        assertFalse(ls1.crosses(ls2));
    }

Any tips to how I can check for crossing, but not touches like this?

Regards,
Tore Halset.
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to