code: public double[] getCoordinates(String inputString)
              throws TypeConversionException {
          String[] cstr = inputString.split(",");
          int coordLength;
          if (cstr.length % 2 == 0) {
              coordLength = cstr.length;
          } else {
              coordLength = cstr.length -1;
          }
  
          double[] coordinates = new double[coordLength];
          try {
              for (int index = 0; index < coordLength; index++) {
                  coordinates[index] = Double.parseDouble(cstr[index]);
              }
              return coordinates;
          } catch (NumberFormatException e) {
              throw new TypeConversionException("String contains non-numeric data. Impossible to create envelope", e);
          }
      }
docs: Retrieves a list of coordinates from the given string. If the number of numbers in the string is odd,
  the last number is ignored.
  
  @param inputString The inputstring
  @return A list of coordinates
  @throws TypeConversionException If the conversion failed