use of com.revolsys.geometry.model.editor.LineStringEditor in project com.revolsys.open by revolsys.
the class LineStringEditorTest method testSetZ.
@Test
public void testSetZ() {
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 LinearRingEditorTest method testNotModified.
@Test
public void testNotModified() {
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 LinearRingEditorTest method testSetZ.
@Test
public void testSetZ() {
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 LinearRingEditorTest method testSetCoordinates.
@Test
public void testSetCoordinates() {
for (int i = 0; i < 4; i++) {
final LineStringEditor lineEditor = LINE_STRING.newGeometryEditor(4);
final int newValue = i * 10;
lineEditor.setCoordinate(0, i, newValue);
final LineString newLineString = lineEditor.newGeometry();
Assert.assertNotSame(LINE_STRING, newLineString);
Assert.assertEquals(newValue, newLineString.getCoordinate(0, i), 0.0);
}
}
use of com.revolsys.geometry.model.editor.LineStringEditor in project com.revolsys.open by revolsys.
the class LinearRingEditorTest method testSetX.
@Test
public void testSetX() {
final LineStringEditor lineEditor = LINE_STRING.newGeometryEditor(3);
lineEditor.setX(0, 10);
final LineString newLineString = lineEditor.newGeometry();
Assert.assertNotSame(LINE_STRING, newLineString);
Assert.assertEquals(10.0, newLineString.getX(0), 0.0);
}
Aggregations