use of com.revolsys.geometry.model.editor.PolygonEditor in project com.revolsys.open by revolsys.
the class PolygonEditorTest method testSetCoordinates.
@Test
public void testSetCoordinates() {
for (int i = 0; i < 4; i++) {
final Polygon polygon = POLYGON;
final PolygonEditor polygonEditor = polygon.newGeometryEditor(4);
final double newValue = POLYGON.getCoordinate(1, 1, i);
polygonEditor.setCoordinate(1, 1, i, newValue);
final Polygon newPolygon = polygonEditor.newGeometry();
Assert.assertNotSame(polygon, newPolygon);
Assert.assertEquals(newValue, newPolygon.getCoordinate(1, 1, i), 0.0);
}
}
use of com.revolsys.geometry.model.editor.PolygonEditor in project com.revolsys.open by revolsys.
the class PolygonEditorTest method testSetX.
@Test
public void testSetX() {
final Polygon polygon = POLYGON;
final PolygonEditor polygonEditor = polygon.newGeometryEditor(3);
polygonEditor.setX(1, 1, 10);
final Polygon newPolygon = polygonEditor.newGeometry();
Assert.assertNotSame(polygon, newPolygon);
Assert.assertEquals(10.0, newPolygon.getX(1, 1), 0.0);
}
Aggregations