use of com.revolsys.geometry.model.editor.LineStringEditor in project com.revolsys.open by revolsys.
the class LinearRingEditorTest method testSetY.
@Test
public void testSetY() {
final LineStringEditor lineEditor = LINE_STRING.newGeometryEditor(3);
lineEditor.setY(0, 10);
final LineString newLineString = lineEditor.newGeometry();
Assert.assertNotSame(LINE_STRING, newLineString);
Assert.assertEquals(10.0, newLineString.getY(0), 0.0);
}
use of com.revolsys.geometry.model.editor.LineStringEditor in project com.revolsys.open by revolsys.
the class LineStringEditorTest method testInsertVertices.
@Test
public void testInsertVertices() {
final LineStringEditor lineEditor = LINE_STRING.newGeometryEditor(3);
lineEditor.setZ(0, 10);
final LineString newLineString = lineEditor.newGeometry();
Assert.assertNotSame(LINE_STRING, newLineString);
Assert.assertEquals(10.0, newLineString.getZ(0), 0.0);
}
use of com.revolsys.geometry.model.editor.LineStringEditor in project com.revolsys.open by revolsys.
the class LineStringEditorTest method testInvalidIndex.
@Test
public void testInvalidIndex() {
final LineStringEditor lineEditor = LINE_STRING.newGeometryEditor();
try {
lineEditor.setZ(new int[0], 13);
Assert.fail("Invalid index should cause exception");
} catch (final Exception e) {
}
}
use of com.revolsys.geometry.model.editor.LineStringEditor in project com.revolsys.open by revolsys.
the class LineStringEditorTest method testSetM.
@Test
public void testSetM() {
final LineStringEditor lineEditor = LINE_STRING.newGeometryEditor(4);
lineEditor.setM(0, 10);
final LineString newLineString = lineEditor.newGeometry();
Assert.assertNotSame(LINE_STRING, newLineString);
Assert.assertEquals(10.0, newLineString.getM(0), 0.0);
}
use of com.revolsys.geometry.model.editor.LineStringEditor in project com.revolsys.open by revolsys.
the class LineStringEditorTest method testSetY.
@Test
public void testSetY() {
final LineStringEditor lineEditor = LINE_STRING.newGeometryEditor(3);
lineEditor.setY(0, 10);
final LineString newLineString = lineEditor.newGeometry();
Assert.assertNotSame(LINE_STRING, newLineString);
Assert.assertEquals(10.0, newLineString.getY(0), 0.0);
}
Aggregations