WKTReader reader = new WKTReader();
DefaultFeatureCollection fc = new DefaultFeatureCollection();
Random rand = new Random();
GridCoordinates2D gridPos = new GridCoordinates2D();
int i = 1;
for (int y = 0; y < gridDim.height; y++) {
for (int x = 0; x < gridDim.width; x++) {
if (rand.nextDouble() < PROB_POINT) {
gridPos.setLocation(x, y);
DirectPosition worldPos = gridGeom.gridToWorld(gridPos);
String wkt = String.format(Locale.US, "MULTIPOINT((%f %f))",
worldPos.getOrdinate(0), worldPos.getOrdinate(1));
fc.add( buildFeature(builder, reader, wkt, "p" + i, i ) );