use of com.revolsys.geometry.graph.linestring.LineStringGraph in project com.revolsys.open by revolsys.
the class LineStringGraphTest method testCleanupStartOverlapWithPShapeAtEnd.
public void testCleanupStartOverlapWithPShapeAtEnd() {
final LineString line = this.geometryFactory.geometry("LINESTRING(844000 1343000,844100 1343000,844200 1343000,844200 1343100,844100 1343100,844100 1343000)");
final LineStringGraph graph = new LineStringGraph(line);
graph.splitEdgesCloseToNodes();
final List<LineString> lines = graph.getLines();
checkLines(lines, "LINESTRING(844000 1343000,844100 1343000)", "LINESTRING(844100 1343000,844200 1343000,844200 1343100,844100 1343100,844100 1343000)");
}
use of com.revolsys.geometry.graph.linestring.LineStringGraph in project com.revolsys.open by revolsys.
the class LineStringGraphTest method testCleanupMidSegmentOverlap.
public void testCleanupMidSegmentOverlap() {
final LineString line = this.geometryFactory.geometry("LINESTRING(844000 1343000,844010 1343000,844020 1343000,844010 1343000,844020 1343000,844030 1343000)");
final LineStringGraph graph = new LineStringGraph(line);
final List<LineString> lines = graph.getLines();
checkLines(lines, "LINESTRING(844000 1343000,844010 1343000,844020 1343000,844030 1343000)");
}
use of com.revolsys.geometry.graph.linestring.LineStringGraph in project com.revolsys.open by revolsys.
the class LineStringGraphTest method testIntersectionFalseEndStart.
public void testIntersectionFalseEndStart() {
final LineString line1 = this.geometryFactory.geometry("LINESTRING(844000 1343000,844100 1343000,844200 1343000)");
final LineStringGraph graph = new LineStringGraph(line1);
final LineString line2 = this.geometryFactory.geometry("LINESTRING(844200 1343000,844300 1343000,844400 1343000)");
final boolean intersects = graph.intersects(line2);
Assert.assertEquals("Intersects incorrect", false, intersects);
}
use of com.revolsys.geometry.graph.linestring.LineStringGraph in project com.revolsys.open by revolsys.
the class LineStringGraphTest method testIntersectionFalseEndEnd.
public void testIntersectionFalseEndEnd() {
final LineString line1 = this.geometryFactory.geometry("LINESTRING(844000 1343000,844100 1343000,844200 1343000)");
final LineStringGraph graph = new LineStringGraph(line1);
final LineString line2 = this.geometryFactory.geometry("LINESTRING(844400 1343000,844300 1343000,844200 1343000)");
final boolean intersects = graph.intersects(line2);
Assert.assertEquals("Intersects incorrect", false, intersects);
}
use of com.revolsys.geometry.graph.linestring.LineStringGraph in project com.revolsys.open by revolsys.
the class LineStringGraphTest method testIntersectionTrueStartMiddle.
public void testIntersectionTrueStartMiddle() {
final LineString line1 = this.geometryFactory.geometry("LINESTRING(800000 1000010,800010 1000010,800020 1000010)");
final LineStringGraph graph = new LineStringGraph(line1);
final LineString line2 = this.geometryFactory.geometry("LINESTRING(800000 1000000,800000 1000010,800000 1000020)");
final boolean intersects = graph.intersects(line2);
Assert.assertEquals("Intersects incorrect", true, intersects);
}
Aggregations