function makeTransformFunction(transformer, zone) {
  return function (input, output, dimension, stride) {
    const length = input.length;
    dimension = dimension > 1 ? dimension : 2;
    stride = stride ?? dimension;
    if (!output) {
      if (dimension > 2) {
        output = input.slice();
      } else {
        output = new Array(length);
      }
    }
    for (let i = 0; i < length; i += stride) {
      const x = input[i];
      const y = input[i + 1];
      const coord = transformer(x, y, zone);
      output[i] = coord[0];
      output[i + 1] = coord[1];
    }
    return output;
  };
}
@param {function(number, number, UTMZone): import('../coordinate.js').Coordinate} transformer The transformer.
@param {UTMZone} zone The UTM zone.
@return {import('../proj.js').TransformFunction} The transform function.