code: public static Geometry[] convexHull(Geometry[] geometries, boolean b_merge) {
  		OperatorConvexHull op = (OperatorConvexHull) factory
  				.getOperator(Operator.Type.ConvexHull);
  		SimpleGeometryCursor simple_cursor = new SimpleGeometryCursor(
  				geometries);
  		GeometryCursor cursor = op.execute(simple_cursor, b_merge, null);
  
  		ArrayList<Geometry> resultGeoms = new ArrayList<Geometry>();
  		Geometry g;
  		while ((g = cursor.next()) != null) {
  			resultGeoms.add(g);
  		}
  
  		Geometry[] output = new Geometry[resultGeoms.size()];
  
  		for (int i = 0; i < resultGeoms.size(); i++)
  			output[i] = resultGeoms.get(i);
  
  		return output;
  	}
docs: Calculates the convex hull.
  
  See OperatorConvexHull
  
  @param geometries
  The input geometry array.
  @param b_merge
  Put true if you want the convex hull of all the geometries in
  the array combined. Put false if you want the convex hull of
  each geometry in the array individually.
  @return Returns an array of convex hulls. If b_merge is true, the result
  will be a one element array consisting of the merged convex hull.