LinearRing shell = factory.createLinearRing(new Coordinate[] { new Coordinate(-10, -10), new Coordinate(10, 0),
new Coordinate(-10, 10), new Coordinate(-10, -10) });
LinearRing hole = factory.createLinearRing(new Coordinate[] { new Coordinate(-5, -5), new Coordinate(5, 0),
new Coordinate(-5, 5), new Coordinate(-5, -5) });
Polygon polygon = factory.createPolygon(shell, new LinearRing[] { hole });
MultiPolygon mp = factory.createMultiPolygon(new Polygon[] { polygon });
// World to screen:
Geometry result = viewPort.transform(mp, RenderSpace.WORLD, RenderSpace.SCREEN);
Coordinate c = result.getGeometryN(0).getGeometryN(0).getCoordinates()[0];
Assert.assertEquals((MAP_WIDTH / 2) - (viewPort.getScale() * 10), c.getX(), DELTA);