Search in sources :

Example 1 with PolygonalEditor

use of com.revolsys.geometry.model.editor.PolygonalEditor in project com.revolsys.open by revolsys.

the class Polygonal method newGeometryEditor.

@Override
default PolygonalEditor newGeometryEditor(final int axisCount) {
    final PolygonalEditor geometryEditor = newGeometryEditor();
    geometryEditor.setAxisCount(axisCount);
    return geometryEditor;
}
Also used : PolygonalEditor(com.revolsys.geometry.model.editor.PolygonalEditor)

Example 2 with PolygonalEditor

use of com.revolsys.geometry.model.editor.PolygonalEditor in project com.revolsys.open by revolsys.

the class MultiPolygonEditorTest method testSetM.

@Test
public void testSetM() {
    final PolygonalEditor editor = POLYGONAL.newGeometryEditor(4);
    editor.setM(1, 1, 1, 10);
    final Polygonal newGeometry = editor.newGeometry();
    Assert.assertNotSame(POLYGONAL, newGeometry);
    Assert.assertEquals(10.0, newGeometry.getM(1, 1, 1), 0.0);
}
Also used : PolygonalEditor(com.revolsys.geometry.model.editor.PolygonalEditor) Polygonal(com.revolsys.geometry.model.Polygonal) Test(org.junit.Test)

Example 3 with PolygonalEditor

use of com.revolsys.geometry.model.editor.PolygonalEditor in project com.revolsys.open by revolsys.

the class MultiPolygonEditorTest method testSetCoordinates.

@Test
public void testSetCoordinates() {
    for (int i = 0; i < 4; i++) {
        final PolygonalEditor editor = POLYGONAL.newGeometryEditor(4);
        final double newValue = POLYGONAL.getCoordinate(1, 1, 1, i);
        editor.setCoordinate(1, 1, 1, i, newValue);
        final Polygonal newGeometry = editor.newGeometry();
        Assert.assertNotSame(POLYGONAL, newGeometry);
        Assert.assertEquals(newValue, newGeometry.getCoordinate(1, 1, 1, i), 0.0);
    }
}
Also used : PolygonalEditor(com.revolsys.geometry.model.editor.PolygonalEditor) Polygonal(com.revolsys.geometry.model.Polygonal) Test(org.junit.Test)

Example 4 with PolygonalEditor

use of com.revolsys.geometry.model.editor.PolygonalEditor in project com.revolsys.open by revolsys.

the class MultiPolygonEditorTest method testSetZ.

@Test
public void testSetZ() {
    final PolygonalEditor editor = POLYGONAL.newGeometryEditor(3);
    editor.setZ(1, 1, 1, 10);
    final Polygonal newGeometry = editor.newGeometry();
    Assert.assertNotSame(POLYGONAL, newGeometry);
    Assert.assertEquals(10.0, newGeometry.getZ(1, 1, 1), 0.0);
}
Also used : PolygonalEditor(com.revolsys.geometry.model.editor.PolygonalEditor) Polygonal(com.revolsys.geometry.model.Polygonal) Test(org.junit.Test)

Example 5 with PolygonalEditor

use of com.revolsys.geometry.model.editor.PolygonalEditor in project com.revolsys.open by revolsys.

the class MultiPolygonEditorTest method testSetX.

@Test
public void testSetX() {
    final PolygonalEditor editor = POLYGONAL.newGeometryEditor(3);
    editor.setX(1, 1, 1, 10);
    final Polygonal newGeometry = editor.newGeometry();
    Assert.assertNotSame(POLYGONAL, newGeometry);
    Assert.assertEquals(10.0, newGeometry.getX(1, 1, 1), 0.0);
}
Also used : PolygonalEditor(com.revolsys.geometry.model.editor.PolygonalEditor) Polygonal(com.revolsys.geometry.model.Polygonal) Test(org.junit.Test)

Aggregations

PolygonalEditor (com.revolsys.geometry.model.editor.PolygonalEditor)7 Polygonal (com.revolsys.geometry.model.Polygonal)6 Test (org.junit.Test)6