@Ignore
@Test
public void testMultiPolygon2Point() throws Exception {
setTarget("name2", "Point", builder.safeCreateGeometry(Point.class, new Coordinate[]{new Coordinate(10,10)}));
Polygon poly = builder.safeCreateGeometry(Polygon.class, new Coordinate[]{
new Coordinate(0,0), new Coordinate(10,0), new Coordinate(10,10), new Coordinate(0,0),
});
Polygon poly2 = builder.safeCreateGeometry(Polygon.class, new Coordinate[]{
new Coordinate(10,10), new Coordinate(20,10), new Coordinate(20,20), new Coordinate(10,10),
});
GeometryFactory fac=new GeometryFactory();
setSource("MultiPolygon", fac.createMultiPolygon(new Polygon[]{poly,poly2}));
copyFeatures(Point.class, 2);
ILayer layer = targetMap.getMapLayers().get(0);
FeatureIterator<SimpleFeature> iter = layer.getResource(FeatureSource.class, null).getFeatures(layer.getFilter()).features();
SimpleFeature feature=iter.next();
assertTrue( poly.getCentroid().getCoordinate().equals(((Geometry)feature.getDefaultGeometry()).getCoordinate()) ||
poly2.getCentroid().getCoordinate().equals(((Geometry)feature.getDefaultGeometry()).getCoordinate()) );
feature=iter.next();
assertTrue( poly.getCentroid().getCoordinate().equals(((Geometry)feature.getDefaultGeometry()).getCoordinate()) ||
poly2.getCentroid().getCoordinate().equals(((Geometry)feature.getDefaultGeometry()).getCoordinate()) );
iter.close();
}