use of com.revolsys.geometry.model.Punctual in project com.revolsys.open by revolsys.
the class MiscellaneousTest method testLineStringGetBoundary1.
/**
* @todo Enable when #isSimple implemented
*/
// public void testLineStringIsSimple1() throws Exception {
// Geometry g = reader.read("LINESTRING(10 10, 20 10, 15 20)");
// assertTrue(g.isSimple());
// }
public void testLineStringGetBoundary1() throws Exception {
final LineString g = (LineString) this.geometryFactory.geometry("LINESTRING(10 10, 20 10, 15 20)");
assertTrue(g.getBoundary() instanceof Punctual);
final Punctual boundary = (Punctual) g.getBoundary();
assertTrue(boundary.getPoint(0).equals(g.getFromPoint()));
assertTrue(boundary.getPoint(1).equals(g.getToPoint()));
}
Aggregations