use of com.revolsys.geometry.model.editor.LinealEditor in project com.revolsys.open by revolsys.
the class MultiLineStringEditorTest method testSetY.
@Test
public void testSetY() {
final LinealEditor editor = LINEAL.newGeometryEditor(3);
editor.setY(1, 1, 10);
final Lineal newGeometry = editor.newGeometry();
Assert.assertNotSame(LINEAL, newGeometry);
Assert.assertEquals(10.0, newGeometry.getY(1, 1), 0.0);
}
use of com.revolsys.geometry.model.editor.LinealEditor in project com.revolsys.open by revolsys.
the class MultiLineStringEditorTest method testNotModified.
@Test
public void testNotModified() {
final LinealEditor editor = LINEAL.newGeometryEditor();
editor.setZ(new int[0], 13);
final Lineal newGeometry = editor.newGeometry();
Assert.assertSame(LINEAL, newGeometry);
}
use of com.revolsys.geometry.model.editor.LinealEditor in project com.revolsys.open by revolsys.
the class MultiLineStringEditorTest method testSetCoordinates.
@Test
public void testSetCoordinates() {
for (int i = 0; i < 4; i++) {
final LinealEditor editor = LINEAL.newGeometryEditor(4);
final double newValue = LINEAL.getCoordinate(1, 1, i);
editor.setCoordinate(1, 1, i, newValue);
final Lineal newGeometry = editor.newGeometry();
Assert.assertNotSame(LINEAL, newGeometry);
Assert.assertEquals(newValue, newGeometry.getCoordinate(1, 1, i), 0.0);
}
}
use of com.revolsys.geometry.model.editor.LinealEditor in project com.revolsys.open by revolsys.
the class MultiLineStringEditorTest method testSetZ.
@Test
public void testSetZ() {
final LinealEditor editor = LINEAL.newGeometryEditor(3);
editor.setZ(1, 1, 10);
final Lineal newGeometry = editor.newGeometry();
Assert.assertNotSame(LINEAL, newGeometry);
Assert.assertEquals(10.0, newGeometry.getZ(1, 1), 0.0);
}
use of com.revolsys.geometry.model.editor.LinealEditor in project com.revolsys.open by revolsys.
the class Lineal method newGeometryEditor.
@Override
default LinealEditor newGeometryEditor(final int axisCount) {
final LinealEditor geometryEditor = newGeometryEditor();
geometryEditor.setAxisCount(axisCount);
return geometryEditor;
}
Aggregations