code: public static double[] createBoundingBox(double[][][] input) {
          double[] bbox = createBoundingBox(input[0]);
          for (int i = 1; i < input.length; i++) {
              double[] current = createBoundingBox(input[i]);
              mergeInto(bbox, current);
          }
          return bbox;
      }
docs: This method computes the boundingbox of a threedimensional list of doubles, which are to be interpreted as
  a list of lists of coordinates (such as the coordinates of a multilinestring or polygon)
  
  @param input a list of lists that each contain two or three doubles (x, y and optional z coordinates)
  @return a list with doubles. the result is a 2*n array where n is the number of dimensions represented
  in the input, with the lowest values for all axes followed by the highest values.