public void testExtractLineIndexAtEndpoint() { checkExtractLine("MULTILINESTRING ((0 0, 10 0), (20 0, 25 0, 30 0))", 10, -1, "LINESTRING (20 0, 25 0, 29 0)"); }
public void testExtractLineBothIndicesAtEndpointXXX() { checkExtractLine("MULTILINESTRING ((0 0, 10 0), (20 0, 25 0, 30 0))", -10, 10, "LINESTRING (10 0, 10 0)"); }
public void testExtractLineReverseMulti() { checkExtractLine("MULTILINESTRING ((0 0, 10 0), (20 0, 25 0, 30 0))", 19, 1, "MULTILINESTRING ((29 0, 25 0, 20 0), (10 0, 1 0))"); }
public void testExtractLineBothIndicesAtEndpoint() { checkExtractLine("MULTILINESTRING ((0 0, 10 0), (20 0, 25 0, 30 0))", 10, 10, "LINESTRING (10 0, 10 0)"); }
public void testExtractLineBothIndicesAtEndpointNegative() { checkExtractLine("MULTILINESTRING ((0 0, 10 0), (20 0, 25 0, 30 0))", -10, 10, "LINESTRING (10 0, 10 0)"); }
public void testExtractLineNegativeReverse() { checkExtractLine("LINESTRING (0 0, 10 0)", -1, -9, "LINESTRING (9 0, 1 0)"); }
public void testExtractLineReverse() { checkExtractLine("LINESTRING (0 0, 10 0)", 9, 1, "LINESTRING (9 0, 1 0)"); }
public void testExtractLineNegative() { checkExtractLine("LINESTRING (0 0, 10 0)", -9, -1, "LINESTRING (1 0, 9 0)"); }
public void testExtractLineBeyondRange() { checkExtractLine("LINESTRING (0 0, 10 10)", -100, 100, "LINESTRING (0 0, 10 10)"); }
/** * Tests that leading and trailing zero-length sublines are trimmed in the computed result, * and that zero-length extracts return the lowest extracted zero-length line */ public void testExtractLineIndexAtEndpointWithZeroLenComponents() { checkExtractLine("MULTILINESTRING ((0 0, 10 0), (10 0, 10 0), (20 0, 25 0, 30 0))", 10, -1, "LINESTRING (20 0, 25 0, 29 0)"); checkExtractLine("MULTILINESTRING ((0 0, 10 0), (10 0, 10 0), (20 0, 25 0, 30 0))", 5, 10, "LINESTRING (5 0, 10 0)"); checkExtractLine("MULTILINESTRING ((0 0, 10 0), (10 0, 10 0), (10 0, 10 0), (20 0, 25 0, 30 0))", 10, 10, "LINESTRING (10 0, 10 0)"); checkExtractLine("MULTILINESTRING ((0 0, 10 0), (10 0, 10 0), (10 0, 10 0), (10 0, 10 0), (20 0, 25 0, 30 0))", 10, -10, "LINESTRING (10 0, 10 0)"); }