Set the current current geometry using the list of geometries which are merged and buffered if requested.

@param geometries geometries to combine
429294
@Api
	public void setGeometry(List<Geometry> geometries) {
		if (geometries.size() == 0) {
			Notify.info(messages.geometricSearchWidgetSelectionSearchNothingSelected());
		} else {
			Integer buffer = (Integer) spiBuffer.getValue();
			if (buffer != 0) {
				SearchCommService.mergeAndBufferGeometries(geometries, buffer, new DataCallback<Geometry[]>() {
					public void execute(Geometry[] result) {
						updateGeometry(geometry, result[1]);
						geometry = result[1];
					}
				});
			} else {
				SearchCommService.mergeGeometries(geometries, new DataCallback<Geometry>() {
					public void execute(Geometry result) {
						updateGeometry(geometry, result);
						geometry = result;
					}
				});
			}
		}
	}
1358962
private static void recursiveSetSrid(Geometry geometry, int srid) {
		if (geometry != null) {
			geometry.setSrid(srid);
		}
		if (geometry.getGeometries() != null) {
			for (Geometry childGeometry : geometry.getGeometries()) {
				recursiveSetSrid(childGeometry, srid);
			}
		}
	}
208432
public static Geometry lineMerge(Geometry geom, GeometryFactory factory) {
        LineMerger merger = new LineMerger();
        merger.add(geom);
        Collection lines = merger.getMergedLineStrings();
        return factory.buildGeometry(lines);
    }
937802
private void writeGeometry(Geometry geom, JsonGenerator gen) throws IOException {       
        if (geom != null) {
            gen.writeObjectFieldStart("geometry");
            if (geom instanceof Point) {
                write((Point) geom, gen);
            } else if (geom instanceof MultiPoint) {
                write((MultiPoint) geom, gen);
            } else if (geom instanceof LineString) {
                write((LineString) geom, gen);
            } else if (geom instanceof MultiLineString) {
                write((MultiLineString) geom, gen);
            } else if (geom instanceof Polygon) {
                write((Polygon) geom, gen);
            } else if (geom instanceof MultiPolygon) {
                write((MultiPolygon) geom, gen);
            } else if (geom instanceof GeometryCollection) {
                write((GeometryCollection) geom, gen);
            } else {
                throw new RuntimeException("Unsupported Geomery type");
            }
            gen.writeEndObject();
        } else {
            gen.writeNullField("geometry");
        }
        
    }
536540
private void setGeometry(JsonParser jp, Object[] values) throws IOException, SQLException {
        if(jp.nextToken()!=JsonToken.VALUE_NULL){//START_OBJECT { in case of null geometry
        jp.nextToken(); // FIELD_NAME type     
        jp.nextToken(); //VALUE_STRING Point
        String geometryType = jp.getText();
        values[0] = parseGeometry(jp, geometryType);
        } 
    }
739813
public static void addGeometryToSegments(Geometry geometry, int flag, ArrayList<SegmentString> segments) {
        for (int i = 0; i < geometry.getNumGeometries(); i++) {
            Geometry component = geometry.getGeometryN(i);
            if (component instanceof Polygon) {
                add((Polygon) component, flag, segments);
            } else if (component instanceof LineString) {
                add((LineString) component, flag, segments);
            }
        }
    }
1151345
public void setMetricTransformations(java.util.Collection<MetricTransformation> metricTransformations) {
        if (metricTransformations == null) {
            this.metricTransformations = null;
            return;
        }

        this.metricTransformations = new com.amazonaws.internal.SdkInternalList<MetricTransformation>(metricTransformations);
    }
306688
public void setGeoMatchSets(java.util.Collection<GeoMatchSetSummary> geoMatchSets) {
        if (geoMatchSets == null) {
            this.geoMatchSets = null;
            return;
        }

        this.geoMatchSets = new java.util.ArrayList<GeoMatchSetSummary>(geoMatchSets);
    }
1226724
public void setDimensionConfigurations(java.util.Collection<CloudWatchDimensionConfiguration> dimensionConfigurations) {
        if (dimensionConfigurations == null) {
            this.dimensionConfigurations = null;
            return;
        }

        this.dimensionConfigurations = new java.util.ArrayList<CloudWatchDimensionConfiguration>(dimensionConfigurations);
    }
794759
private List<Coordinate> getCoordinates(List<Geometry> geometries) {
		List<Coordinate> coordinates = new ArrayList<Coordinate>();
		for (Geometry geometry : geometries) {
			Coordinate[] geometryCoordinates = geometry.getCoordinates();
			for (int i = 0; i < geometryCoordinates.length; i++) {
				coordinates.add(geometryCoordinates[i]);
			}
		}
		return coordinates;
	}
534383
public void setPoints(Iterable<Point> points) {
		if (points==null) throw new NullPointerException();
		this.points.clear();
		for (Point p : points) {
			this.points.add(new Point(p));
		}
		repaint();
	}
1320583
@Override
	public void startOperationSequence() throws GeometryOperationFailedException {
		if (current != null) {
			throw new GeometryOperationFailedException("An operation sequence has already been started.");
		}
		current = new OperationSequence();
		redoQueue.clear();
	}
355732
public static void reproject( CoordinateReferenceSystem from, CoordinateReferenceSystem to, Object[] geometries )
            throws Exception {
        MathTransform mathTransform = CRS.findMathTransform(from, to);

        for( int i = 0; i < geometries.length; i++ ) {
            geometries[i] = JTS.transform((Geometry) geometries[i], mathTransform);
        }
    }
720678
public void setApps(java.util.Collection<App> apps) {
        if (apps == null) {
            this.apps = null;
            return;
        }

        this.apps = new java.util.ArrayList<App>(apps);
    }
700899
private void updateGeometry(Geometry geometry, GeometryIndex index, boolean bringToFront)
			throws GeometryIndexNotFoundException {
		// Some initialization:
		String identifier = baseName + "." + editingService.getIndexService().format(index);
		boolean marked = editingService.getIndexStateService().isMarkedForDeletion(index);

		// Find current and previous parent groups:
		Composite parentGroup = groups.get(identifier.substring(0, identifier.lastIndexOf('.')) + ".geometries");

		// Find the correct style:
		ShapeStyle style = new ShapeStyle();
		if (marked) {
			style = styleService.getBackgroundMarkedForDeletionStyle();
		}

		// Draw the inner ring:
		org.geomajas.gwt.client.spatial.geometry.Geometry transformed = mapWidget.getMapModel().getMapView()
				.getWorldViewTransformer()
				.worldToPan(GeometryConverter.toGwt(editingService.getIndexService().getGeometry(geometry, index)));
		if (transformed instanceof LinearRing) {
			Polygon polygon = mapWidget.getMapModel().getGeometryFactory()
					.createPolygon((LinearRing) transformed, null);
			mapWidget.getVectorContext().drawPolygon(parentGroup, identifier + ".background", polygon, style);
		}
	}
149997
@Override
	public void start(Geometry geometry) {
		if (started) {
			return;
		}
		this.geometry = geometry;
		if (geometry == null) {
			throw new IllegalArgumentException("Null geometry not allowed.");
		}
		started = true;
		eventBus.fireEvent(new GeometryEditStartEvent(geometry));
	}
1224935
public void setMdcTags(Set<String> mdcTags) {
        if (mdcTags == null) {
            this.mdcTags = new HashSet<>();
        } else {
            this.mdcTags = mdcTags;
        }
    }