Search in sources :

Example 1 with LinealEditor

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);
}
Also used : LinealEditor(com.revolsys.geometry.model.editor.LinealEditor) Lineal(com.revolsys.geometry.model.Lineal) Test(org.junit.Test)

Example 2 with LinealEditor

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);
}
Also used : LinealEditor(com.revolsys.geometry.model.editor.LinealEditor) Lineal(com.revolsys.geometry.model.Lineal) Test(org.junit.Test)

Example 3 with LinealEditor

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);
    }
}
Also used : LinealEditor(com.revolsys.geometry.model.editor.LinealEditor) Lineal(com.revolsys.geometry.model.Lineal) Test(org.junit.Test)

Example 4 with LinealEditor

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);
}
Also used : LinealEditor(com.revolsys.geometry.model.editor.LinealEditor) Lineal(com.revolsys.geometry.model.Lineal) Test(org.junit.Test)

Example 5 with LinealEditor

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;
}
Also used : LinealEditor(com.revolsys.geometry.model.editor.LinealEditor)

Aggregations

LinealEditor (com.revolsys.geometry.model.editor.LinealEditor)7 Lineal (com.revolsys.geometry.model.Lineal)6 Test (org.junit.Test)6