private void runExtractLine(String wkt, LinearLocation start, LinearLocation end, String expected) { Geometry geom = read(wkt); LocationIndexedLine lil = new LocationIndexedLine(geom); Geometry result = lil.extractLine(start, end); //System.out.println(result); checkExpected(result, expected); }
public void testMultiLineString2() throws Exception { runExtractLine("MULTILINESTRING ((0 0, 10 10), (20 20, 30 30))", new LinearLocation(0, 0, 1.0), new LinearLocation(1, 0, .5), "MULTILINESTRING ((10 10, 10 10), (20 20, 25 25))"); }
public void testMultiLineStringSimple() throws Exception { runExtractLine("MULTILINESTRING ((0 0, 10 10), (20 20, 30 30))", new LinearLocation(0, 0, .5), new LinearLocation(1, 0, .5), "MULTILINESTRING ((5 5, 10 10), (20 20, 25 25))"); }