use of com.revolsys.geometry.model.editor.PolygonEditor in project com.revolsys.open by revolsys.
the class Polygon method newGeometryEditor.
@Override
default PolygonEditor newGeometryEditor(final int axisCount) {
final PolygonEditor geometryEditor = newGeometryEditor();
geometryEditor.setAxisCount(axisCount);
return geometryEditor;
}
use of com.revolsys.geometry.model.editor.PolygonEditor in project com.revolsys.open by revolsys.
the class PolygonEditorTest method testSetZ.
@Test
public void testSetZ() {
final Polygon polygon = POLYGON;
final PolygonEditor polygonEditor = polygon.newGeometryEditor(3);
polygonEditor.setZ(1, 1, 10);
final Polygon newPolygon = polygonEditor.newGeometry();
Assert.assertNotSame(polygon, newPolygon);
Assert.assertEquals(10.0, newPolygon.getZ(1, 1), 0.0);
}
use of com.revolsys.geometry.model.editor.PolygonEditor in project com.revolsys.open by revolsys.
the class PolygonEditorTest method testSetM.
@Test
public void testSetM() {
final Polygon polygon = POLYGON;
final PolygonEditor polygonEditor = polygon.newGeometryEditor(4);
polygonEditor.setM(1, 1, 10);
final Polygon newPolygon = polygonEditor.newGeometry();
Assert.assertNotSame(polygon, newPolygon);
Assert.assertEquals(10.0, newPolygon.getM(1, 1), 0.0);
}
use of com.revolsys.geometry.model.editor.PolygonEditor in project com.revolsys.open by revolsys.
the class PolygonEditorTest method testSetY.
@Test
public void testSetY() {
final Polygon polygon = POLYGON;
final PolygonEditor polygonEditor = polygon.newGeometryEditor(3);
polygonEditor.setY(1, 1, 10);
final Polygon newPolygon = polygonEditor.newGeometry();
Assert.assertNotSame(polygon, newPolygon);
Assert.assertEquals(10.0, newPolygon.getY(1, 1), 0.0);
}
use of com.revolsys.geometry.model.editor.PolygonEditor in project com.revolsys.open by revolsys.
the class PolygonEditorTest method testNotModified.
@Test
public void testNotModified() {
final Polygon polygon = POLYGON;
final PolygonEditor polygonEditor = polygon.newGeometryEditor();
try {
polygonEditor.setZ(new int[0], 13);
Assert.fail("Invalid index should cause exception");
} catch (final Exception e) {
}
}
Aggregations